You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experienced random disconnects from my ESP8266 Websocket Client.
The websocket server is uvicorn 0.15.0 and i compared the debug logs from uvicorn with the crashes from the ESP.
Then i saw a pattern: Everytime a binary ping from uvicorn that is including 0x00 the ESP responds with a wrong, cut-off pong.
The library seems to cut off before 0x00 and then sends it. 0x71 = "q" as text. I don't know why the first one is interpreted as text and the other as binary but the other ones are obvious.
I know this library isn't that active but this may save someone else from the headache that i had from figuring this out as some time passed on waiting for uvicorn to send the right ping packet and narrowing this down.
Or maybe someone could help with fixing this bug or else i have to search for an alternative.
The text was updated successfully, but these errors were encountered:
The solution is to modify the argument passed to pong in file websockets_endpoint.cpp. It should be pong(std::move(msg.rawData())), when was this pong(internals::fromInterfaceString(msg.data()));
then the data passed through the c_str() function twice, which caused String to be read only until 0x00 was encountered.
I experienced random disconnects from my ESP8266 Websocket Client.
The websocket server is uvicorn 0.15.0 and i compared the debug logs from uvicorn with the crashes from the ESP.
Then i saw a pattern: Everytime a binary ping from uvicorn that is including 0x00 the ESP responds with a wrong, cut-off pong.
I took three samples:
The library seems to cut off before 0x00 and then sends it. 0x71 = "q" as text. I don't know why the first one is interpreted as text and the other as binary but the other ones are obvious.
I know this library isn't that active but this may save someone else from the headache that i had from figuring this out as some time passed on waiting for uvicorn to send the right ping packet and narrowing this down.
Or maybe someone could help with fixing this bug or else i have to search for an alternative.
The text was updated successfully, but these errors were encountered: