Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

net: destroy socket on DNS error

The socket was never destroyed on DNS errors. This broke some clients, including
lib/https.js.
  • Loading branch information...
commit 4671e54495a29696ae8e5f9bd17ba4c63f5d1b23 1 parent 68db206
@SaltwaterC SaltwaterC authored bnoordhuis committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/net.js
View
1  lib/net.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.