cesanta / mongoose

Embedded Web Server
https://mongoose.ws
Other
11.01k stars 2.71k forks source link

Can't reconnect websocket connection after getting a "DNS timeout" error #2870

Closed luisyague closed 1 month ago

luisyague commented 1 month ago

Environment

Thanks a lot in advance!!!

scaprile commented 1 month ago

It is impossible to know what you are doing if you don't show what you are doing It is impossible to know what happens if you don't show what happens. There is no "socket reconnect" problem, your DNS resolution is failing, how do you expect to connect somewhere when its name can not be resolved ? Why is the DNS resolution failing ? It is your network, you should know better than I can guess. Is your WiFi connection going down and up ? You are not expecting sockets to remain usable after a connection change, are you ? If your connection is not stable, you must close all open sockets and open them again. That includes the DNS resolver, so the best way is to free the manager resources and start again. Knowing what is going on, with a proper network capture, maybe the answer would be different