Close the socket/keepalive when going offline

// FREEBIE
This commit is contained in:
lilia 2015-09-30 12:34:10 -07:00
parent c1b9f3235f
commit 9a63703340

View file

@ -188,6 +188,7 @@
setTimeout(init, 60000); setTimeout(init, 60000);
} else { } else {
console.log('offline'); console.log('offline');
messageReceiver.close();
window.addEventListener('online', init); window.addEventListener('online', init);
} }
return; return;