Better handling of online/offline behavior, socket shutdown (#1593)

* Online/offline: Always stop timer, don't connect if closed

* Sockets: Send our own close event faster, shutdown only on close

Seems that we were too-aggressively disconnecting from all socket
events. Also, we should be able to send our own close event a lot
faster with no ill effects.

* Catch-up libtextsecure changes
This commit is contained in:
Scott Nonnenberg 2017-10-23 14:38:43 -07:00 committed by GitHub
parent 3b810d3196
commit 6a895f0e27
4 changed files with 14 additions and 6 deletions

View file

@ -185,6 +185,10 @@
disconnectTimer = null;
return;
}
if (disconnectTimer) {
clearTimeout(disconnectTimer);
disconnectTimer = null;
}
connect();
}