Skip to content
Browse files

package: update client

* client: handle transport errors
  • Loading branch information...
1 parent b5a5abd commit 35e127e93f46a0f73aa61b6d6580f4696dbdc883 @indutny indutny committed
Showing with 8 additions and 4 deletions.
  1. +2 −2 package.json
  2. +6 −2 server-plugin/www/client.js
View
4 package.json
@@ -16,9 +16,9 @@
"dependencies": {
"smith": "https://github.com/c9/smith/tarball/packing-fix",
"msgpack-js-browser": "~0.1.3",
- "engine.io": "https://github.com/c9/engine.io/tarball/fd6f8740fabcc584345d6c64344501b94b89c5c1"
+ "engine.io": "https://github.com/c9/engine.io/tarball/5f6fb9e32caed4f3edbb9f8536a13a20435d3d69"
},
"scripts": {
"test": "node test/all.js"
}
-}
+}
View
8 server-plugin/www/client.js
@@ -309,7 +309,11 @@ define(function(require, exports, module) {
}
});
- _self.transport.on("disconnect", function (reason) {
+ _self.transport.on("disconnect", ondisconnect);
+ _self.transport.on("error", ondisconnect);
+ function ondisconnect(reason) {
+ // Ignore probe errors
+ if (/probe error/i.test(reason)) return;
if (_self.debug) {
log("Disconnect socket: " + reason);
@@ -325,7 +329,7 @@ define(function(require, exports, module) {
}
reconnect();
- });
+ };
callback(null, _self);
});

0 comments on commit 35e127e

Please sign in to comment.
Something went wrong with that request. Please try again.