http: .once() usage in setTimeout
This commit is contained in:
parent
91120e0429
commit
e3ceee2dce
@ -1335,13 +1335,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…
x
Reference in New Issue
Block a user