From 3862675b1d593fb9fa00c4336040b8f46b07204d Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 5 Dec 2017 14:40:08 +0100 Subject: [PATCH] fix: new close protocol (close: true) because GoogleChrome does not send the close handshake (test@1) --- view/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/main.js b/view/main.js index beddbed..df45fa3 100755 --- a/view/main.js +++ b/view/main.js @@ -91,6 +91,6 @@ window.wsc_chat = window.wsc.channel('chat').listen(function(msg, err){ /* (4) Clean sockets before page quit ---------------------------------------------------------*/ window.onbeforeunload = function() { - window.wsc_chat.ws.close(); - window.wsc_connect.ws.close(); + window.wsc_chat.send('{"close": true}'); + window.wsc_connect.send('{"close": true}'); }; \ No newline at end of file