-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket freezes - LmacRxBlk:1 #23
Comments
i never had this kind of problem, can you please add Serial.setDebugOutput(true); and enable the DEBUG_WEBSOCKETS. |
Yes I thought the same on the RX/TX issue. When I add my patch I still get some of the received data, less frequent of course... Here's the last part of the log:
|
I made some changes can you test them? |
Hi,
Did I missed this .h file? Is it from a certain version of the IDE? |
its only in the git version of the core, |
you mean the arduino IDE core? I currently have the 2.0.0 rc2 from the staging versions. |
the easy-es way it to follow this: you need to remove the version in your user dir. |
EDIT: |
the debug out is disabled. |
Ah... you answered before I had the chance to fix my comment :) But I am still wondering how come when I've added my patch it solved the problem... What's the maximum by the way? do you know? |
if you do less sendFrame there is more time to handle the incoming data :) espressif not provide any info about this part of the chip. |
OK, Thanks for the info! |
I ran into something similar on this. The websocket module would fail and not recover when transmitting data from main loop on a 1s period while receiving continuous data from an html slider. I fixed it by putting a 1ms delay after the websocket transmit (sendTXT) portion in the main loop, as if it needs a break to finish it's job after transmit call has returned. Also, if a client breaks connection without properly disconnecting, it hangs the server for 10 or 20 seconds every loop. I fixed this by pinging all possible clients and disconnecting the ones that fail that were thought to be active by the server. |
Hi,
So I've been using your code for quite sometime and found it very nice.
However, I've encountered a "timing" problem: When I try to send data from the ESP8266 but its "receiving buffer" is still not empty, the code sometime stuck and stop working, solved only with reset.
Don't know if it is my fault for using it wrong or if not what is the best way to fix it - But at least in my case I wrote a small patch which solved the issue (I'm not the best coder).
On WebSocketServer.cpp, on the "WebSocketsServer::sendTXT" function I've added just before the "sendFrame" function this code:
which cancels the sending in case the buffer is not empty.
If I'm not the first one reporting this issue please let me know if there's a better solution.
Thanks,
Amir
The text was updated successfully, but these errors were encountered: