Better handling of network disconnection/reconnection (#1546)

* Ensure that our preload.js setImmediate call finds right function

FREEBIE

* Our own socket close event, better logging, unregistration

FREEBIE

* Return CLOSED for NetworkStatusView if we've fully disconnected

* background.js: Remove messageReceiver = null, log in connect()

A null messageReciever makes the NetworkStatusView think we're online.

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-10-06 16:28:13 -07:00 committed by GitHub
parent 52cc8355a6
commit b64f2969fd
6 changed files with 363 additions and 228 deletions

View file

@ -41,7 +41,7 @@
// Linux seems to periodically let the event loop stop, so this is a global workaround
setInterval(function() {
setImmediate(function() {});
window.nodeSetImmediate(function() {});
}, 1000);
window.EmojiConvertor = require('emoji-js');