Skip to content

Commit eb09b06

Browse files
committed
http: destroy socket on error
Needs further investigation, the test passed without `--use-uv`. Fixes failing test: test/simple/test-http-dns-fail.js
1 parent 3d4ae3a commit eb09b06

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/http2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,7 @@ ClientRequest.prototype.onSocket = function(socket) {
10881088
// and we need to make sure we don't double-fire the error event.
10891089
req._hadError = true;
10901090
parser.finish();
1091+
socket.destroy();
10911092
}
10921093
socket.on('error', errorListener);
10931094

0 commit comments

Comments
 (0)