Hi there old friend,
We just upgraded from 4.6.1 to 5.0.4. Prior to the upgrade, our code was working totally fine but now occasionally crashes.
Our code first callsconnect(url, transports=["websockets"], headers={"Authorization": "FakeAuthHeader"}) which succeeds and the library's logging prints Engine.IO connection established. Sometimes, it then promptly prints Namespace / is connected. Other times, our code reaches emit("auth", API_KEY) which then errors with socketio.exceptions.BadNamespaceError: / is not a connected namespace. but interleaved in the traceback is Namespace / is connected. It seems like there's a race-condition in how connect(...) -> _handle_eio_connect -> _send_packet -> _handle_connect flows and it's not entirely synchronous.
I skimmed the code but didn't immediately see the problem. Hopefully this helps.
Hi there old friend,
We just upgraded from 4.6.1 to 5.0.4. Prior to the upgrade, our code was working totally fine but now occasionally crashes.
Our code first calls
connect(url, transports=["websockets"], headers={"Authorization": "FakeAuthHeader"})which succeeds and the library's logging printsEngine.IO connection established. Sometimes, it then promptly printsNamespace / is connected. Other times, our code reachesemit("auth", API_KEY)which then errors withsocketio.exceptions.BadNamespaceError: / is not a connected namespace.but interleaved in the traceback isNamespace / is connected. It seems like there's a race-condition in howconnect(...) -> _handle_eio_connect -> _send_packet -> _handle_connectflows and it's not entirely synchronous.I skimmed the code but didn't immediately see the problem. Hopefully this helps.