The event of disconnection in time is not called
Hello, I have a small WebSocket server in C++ which is used to create a lobby for my little game on Godot. The thing is that if the client is already connected for some time (about 20 minutes), when it disconnects, the disconnect event is not called.
Server code Server startup is main.cpp, data processing is data_received.cpp, disconnected processing is disconnected.cpp.
Sorry if the sentences are not composed very well, I used a translator.
https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 says:
* %x8 denotes a connection close
I suggest you run Wireshark on the server's host and see if it receives that code when the client disconnects. If not, then run Wireshark on the client's host and see if it sends the code.
Or you could use lack of a heartbeat to know that a client is lost. See https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.3