mirror of https://github.com/nodejs/node.git
net: destroy socket on DNS error
The socket was never destroyed on DNS errors. This broke some clients, including lib/https.js.pull/5370/head
parent
68db20656e
commit
4671e54495
|
@ -570,6 +570,7 @@ Socket.prototype.connect = function(port /* [host], [cb] */) {
|
|||
// error event to the next tick.
|
||||
process.nextTick(function() {
|
||||
self.emit('error', err);
|
||||
self.destroy();
|
||||
});
|
||||
} else {
|
||||
timers.active(self);
|
||||
|
|
Loading…
Reference in New Issue