fix: new close protocol (close: true) because GoogleChrome does not send the close handshake (test@1)

This commit is contained in:
xdrm-brackets 2017-12-05 14:40:08 +01:00
parent 0f1d995c94
commit 3862675b1d
1 changed files with 2 additions and 2 deletions

View File

@ -91,6 +91,6 @@ window.wsc_chat = window.wsc.channel('chat').listen(function(msg, err){
/* (4) Clean sockets before page quit /* (4) Clean sockets before page quit
---------------------------------------------------------*/ ---------------------------------------------------------*/
window.onbeforeunload = function() { window.onbeforeunload = function() {
window.wsc_chat.ws.close(); window.wsc_chat.send('{"close": true}');
window.wsc_connect.ws.close(); window.wsc_connect.send('{"close": true}');
}; };