upd: view.main (removed websocket closing protocol (PING/PONG will destroy it automatically))
This commit is contained in:
parent
5d9e6ef83f
commit
926f5d1224
11
view/main.js
11
view/main.js
|
@ -122,13 +122,4 @@ window.wsc_chat = wsc.channel('chat').listen(function(msg, err){
|
||||||
if( router.app.$route.path != 'inbox' )
|
if( router.app.$route.path != 'inbox' )
|
||||||
gstore.data.notif[1].count += msg.msg.length
|
gstore.data.notif[1].count += msg.msg.length
|
||||||
|
|
||||||
}).send({name: _SERVER.session.name});
|
}).send({name: _SERVER.session.name});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* (4) Clean sockets before page quit
|
|
||||||
---------------------------------------------------------*/
|
|
||||||
window.onbeforeunload = function() {
|
|
||||||
wsc_chat.send('{"close": true}');
|
|
||||||
wsc_connect.send('{"close": true}');
|
|
||||||
};
|
|
Loading…
Reference in New Issue