mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
net: destroy socket on DNS error
The socket was never destroyed on DNS errors. This broke some clients, including lib/https.js.
This commit is contained in:
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
Block a user