Skip to content

Commit

Permalink
http: destroy socket on error
Browse files Browse the repository at this point in the history
Needs further investigation, the test passed without `--use-uv`.

Fixes failing test:
  test/simple/test-http-dns-fail.js
  • Loading branch information
bnoordhuis committed Aug 11, 2011
1 parent 3d4ae3a commit eb09b06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/http2.js
Expand Up @@ -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);

Expand Down

0 comments on commit eb09b06

Please sign in to comment.