On Friday, September 28, 2012 1:05:58 PM UTC+2, 3rdEden wrote:
Did you try to shutdown the connection during unload or beforeunload?
Even before any of those. I have a button on the screen that says "Leave game" with the following code:
<input type="button" onClick="leavePage();" name="Leave page">
function leavePage()
{
socket.disconnect();
document.location = '/menu.html';
}
That did not work. Maybe I should use something else and not socket.disconnect()? I find
socket.io docs lacking regarding closing the connection on the client side. Even googling does not help much.
Thanks,
M.