Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fix test-regress-GH-819
Browse files Browse the repository at this point in the history
Problem was exposed in 12798c6.
  • Loading branch information
ry committed Sep 19, 2011
1 parent 3aa1975 commit 6326b04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/net_uv.js
Expand Up @@ -483,6 +483,11 @@ Socket.prototype.connect = function(port /* [host], [cb] */) {
} else if (typeof host == 'string') {
debug("connect: find host " + host);
require('dns').lookup(host, function(err, ip, addressType) {
// It's possible we were destroyed while looking this up.
// XXX it would be great if we could cancel the promise returned by
// the look up.
if (!self._connecting) return;

if (err) {
// net.createConnection() creates a net.Socket object and
// immediately calls net.Socket.connect() on it (that's us).
Expand Down

0 comments on commit 6326b04

Please sign in to comment.