Browse Source

http: destroy socket on error

Needs further investigation, the test passed without `--use-uv`.

Fixes failing test:
  test/simple/test-http-dns-fail.js
v0.7.4-release
Ben Noordhuis 14 years ago
parent
commit
eb09b0644b
  1. 1
      lib/http2.js

1
lib/http2.js

@ -1088,6 +1088,7 @@ ClientRequest.prototype.onSocket = function(socket) {
// and we need to make sure we don't double-fire the error event.
req._hadError = true;
parser.finish();
socket.destroy();
}
socket.on('error', errorListener);

Loading…
Cancel
Save