-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fix missing log entries in web #1652
Comments
There was a bug in the React code, which I fixed in the 3.7.0-dev.1, where the EventStream could be initiated more than once when the web page is mounted, which could account for some messages getting lost. I'll see if this helps with this issue by slowing down the WiFi on a real ESP32 next,. |
If you compile with in 3.7.0-dev.2 |
Wow, no missing logs with 30ms on my old notebook with compiler running in background. I think you can close the issue. Also no doubletts when removing the id checks. |
Great, I close this one then. Was a silly thing in how React renders the DOM on page rendering. Before it was easier with onMount(). |
I've also tested with wait-delay completly removed and buffer 100. Works good. Next i send all buffer messages at once (in one loop), works also, but maybe this blocks the main loop too long and it takes much memory for TCP buffering. Better leave it by one message per loop. |
@MichaelDvP in 3.7.0-dev.36 I've removed the buffer delay after updating AsyncEventSource with this: mathieucarbou/ESPAsyncWebServer@0163e04 with Ping test enabled, and setting the browser to slow 3G network and high CPU throttle I'm not missing any incoming messages. |
There is a chance of log messages being skipped when displayed on the Web specially on slow networks.
MichaelDvP suggested the following:
"Maybe set a longer timeout (300-500ms) in EMS-ESP and post back the message-id on an event received. If the post is received in EMS-ESP, the next message-event can be sent immediately; otherwise, you can just repeat the message after a timeout. It could also help to pack all queued messages into one event as json-array, which reduces the number of events."
which is a perfect solution.
Originally posted by @MichaelDvP in #1611 (comment)
The text was updated successfully, but these errors were encountered: