Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated the timeout handling code because strange behaviour was obser…

…ved.
  • Loading branch information...
commit 7f24407535aa80b5c9ed08fac740741130547f7c 1 parent acdbd21
@argon authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/connection.js
View
3  lib/connection.js
@@ -186,9 +186,10 @@ Connection.prototype.connect = function () {
this.socket.setNoDelay(false);
- this.socket.setTimeout(this.options.connectionTimeout, this.socketTimeout.bind(this));
+ this.socket.setTimeout(this.options.connectionTimeout);
this.socket.on("error", this.errorOccurred.bind(this));
+ this.socket.on("timeout", this.socketTimeout.bind(this));
this.socket.on('data', this.handleTransmissionError.bind(this));
this.socket.on("drain", this.socketDrained.bind(this));
this.socket.on('clientError', this.errorOccurred.bind(this));
Please sign in to comment.
Something went wrong with that request. Please try again.