Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

client: fix possible double reconnection

  • Loading branch information...
commit 53cd731866537bed742143602d31dd8da7c74fb9 1 parent 35e127e
@indutny indutny authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 server-plugin/www/client.js
View
5 server-plugin/www/client.js
@@ -311,10 +311,15 @@ define(function(require, exports, module) {
_self.transport.on("disconnect", ondisconnect);
_self.transport.on("error", ondisconnect);
+ var once = false;
function ondisconnect(reason) {
// Ignore probe errors
if (/probe error/i.test(reason)) return;
+ // Only one try to reconnect
+ if (once) return;
+ once = true;
+
if (_self.debug) {
log("Disconnect socket: " + reason);
}
Please sign in to comment.
Something went wrong with that request. Please try again.