Browse Source

http: .once() usage in setTimeout

v0.9.1-release
isaacs 13 years ago
parent
commit
0abe42a0f4
  1. 4
      lib/http.js

4
lib/http.js

@ -1494,13 +1494,13 @@ ClientRequest.prototype.setTimeout = function(msecs, callback) {
}
if (this.socket) {
this.socket.on('connect', function() {
this.socket.once('connect', function() {
this.setTimeout(msecs, emitTimeout);
});
return;
}
this.on('socket', function(sock) {
this.once('socket', function(sock) {
this.setTimeout(msecs, emitTimeout);
});
};

Loading…
Cancel
Save