Close sockets 'beforeunload'
This commit is contained in:
parent
c02253dc11
commit
e0debfed54
|
@ -77,3 +77,10 @@ window.wsc_chat = window.wsc.channel('chat').listen(function(msg, err){
|
||||||
}).send({name: window._SERVER.session.name});
|
}).send({name: window._SERVER.session.name});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* (4) Clean sockets before page quit
|
||||||
|
---------------------------------------------------------*/
|
||||||
|
window.onbeforeunload = function() {
|
||||||
|
window.wdc_chat.ws.close();
|
||||||
|
window.wdc_connect.ws.close();
|
||||||
|
};
|
Loading…
Reference in New Issue