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.v0.7.4-release
parent
68db20656e
commit
4671e54495
|
@ -570,6 +570,7 @@ Socket.prototype.connect = function(port /* [host], [cb] */) {
|
||||||
// error event to the next tick.
|
// error event to the next tick.
|
||||||
process.nextTick(function() {
|
process.nextTick(function() {
|
||||||
self.emit('error', err);
|
self.emit('error', err);
|
||||||
|
self.destroy();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
timers.active(self);
|
timers.active(self);
|
||||||
|
|
Loading…
Reference in New Issue