Fix GH-819. Drop out if connection destroyed before connect()
This commit is contained in:
parent
7e28630f5e
commit
d7a86ff05e
@ -547,6 +547,8 @@ Socket.prototype.setEncoding = function(encoding) {
|
||||
|
||||
|
||||
function doConnect(socket, port, host) {
|
||||
if (socket.destroyed) return;
|
||||
|
||||
timers.active(socket);
|
||||
|
||||
try {
|
||||
|
7
test/simple/test-regress-GH-819.js
Normal file
7
test/simple/test-regress-GH-819.js
Normal file
@ -0,0 +1,7 @@
|
||||
var common = require('../common');
|
||||
var net = require('net');
|
||||
var assert = require('assert');
|
||||
|
||||
// Connect to something that we need to DNS resolve
|
||||
var c = net.createConnection(80, "google.com");
|
||||
c.destroy();
|
Loading…
x
Reference in New Issue
Block a user