mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
http: destroy socket on error
Needs further investigation, the test passed without `--use-uv`. Fixes failing test: test/simple/test-http-dns-fail.js
This commit is contained in:
parent
3d4ae3ab4d
commit
eb09b0644b
@ -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…
Reference in New Issue
Block a user