Closed TheGrandmother closed 8 years ago
If you dont close their connection to their server they will not timeout.
How was the test performed?
I added a statement to the server that manually closes the connection when a LOGOUT message is received. commit a4c5d538fa3178ba492f7c40ead87f513a5d1c5e
I just logged in with a bunch of different users rough the browser interface to test the say action.
What I did was I just reloaded the page to log in a new user which should have terminated the previous connection.
Are you sure the server was running the latest version at the time with the memory leak and logout fix?
The client does not send a logout when it is closed. Shouldn't the heart beats automatically close the connection after a timeout
There are no heartbeats any more.
Yes I was using the latest version.
Why has the heart stopped beating?
The server would have to automatically send the logout message to the game engine. It can't be done reliably on the browser side.
Then i need to look into how the websocket library handles disconnects and whether or not it timesout the connection. It might be that it considers your page reload to be the same connection and never terminate it.
I think there is a keep alive option for websocket connections which might fuck up
Looking at the source of the library, it seems to close the connection when it finds EOT (possibly end of transmission, there are no comments or documentation to explain it) or when it receives an closing handshake from the other side.
Then we need to re implement heart beats. It's impossible to send a logout message if the browser shuts down unexpectedly.
Solved by 05c1d74e955124912a8d092b267add0ac26c3abb
Clients never gets removed or timedout. I logged in a bunch of users like 30 minutes ago and they are still active :/