Browse Source

Agent socket errors bubble up to req only if req exists

Fixes #836.
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
110f06578d
  1. 5
      lib/http.js

5
lib/http.js

@ -1194,13 +1194,12 @@ Agent.prototype._establishNewConnection = function() {
req = self.queue.shift();
assert(req._queue === self.queue);
req._queue = null;
} else {
// No requests on queue? Where is the request
assert(0);
}
if (req) {
req.emit('error', err);
req._hadError = true; // hacky
}
// clean up so that agent can handle new requests
parser.finish();

Loading…
Cancel
Save