Open Bernhard17 opened 1 month ago
Hi,
There is no way atm to customise this timeout: the ping is done to detect a connection failure asap in order to have the UI reconnect asap also. For exemple changing that would break the speed of the reconnect after an ESP restart.
What I don't get is why the connection is lost. The code is made in order to retry always until it can connect.
It never recovers ?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
First of all, thank you for the fork of WebSerialLite library. Great improvement. But it is possible to set the ping timeout?
demo.ino:
[WebSerial] Connecting... [WebSerial] Connected... IP address: 192.168.5.162 Millis=4570674 Free heap=[198268] IP address: 192.168.5.162 Millis=4586684 Free heap=[197820] IP address: 192.168.5.162 Millis=4588686 Free heap=[198620] IP address: 192.168.5.162 Millis=4590689 Free heap=[198332] IP address: 192.168.5.162 Millis=4592689 Free heap=[197336] IP address: [WebSerial] Ping timeout. [WebSerial] Connecting... [WebSerial] Connected... IP address: 192.168.5.162 Millis=4600690 Free heap=[197144] IP address: 192.168.5.162 Millis=4602691 Free heap=[197728] IP address: 192.168.5.162 Millis=4604693 Free heap=[196688] IP address: 192.168.5.162 Millis=4606693 Free heap=[196908] IP address: [WebSerial] Ping timeout. [WebSerial] Connecting... [WebSerial] Connected...
Then the connection is lost.
It's a weak connection, but it works. It seems that the timeout is too short. It would be nice if you could set the timeout or switch it off completely.