Browse Source

Fixes #1085. The agent end event may call detachSocket() after the socket is detached and destroyed by abort(). This patch avoids that behavior.

v0.7.4-release
Stefan Rusu 14 years ago
committed by koichik
parent
commit
5b02d564c3
  1. 3
      lib/http.js

3
lib/http.js

@ -1333,7 +1333,10 @@ Agent.prototype._establishNewConnection = function() {
debug('AGENT socket keep-alive');
}
// The socket may already be detached and destroyed by an abort call
if (socket._httpMessage) {
req.detachSocket(socket);
}
assert(!socket._httpMessage);

Loading…
Cancel
Save