mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08: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:
1 parent
3d4ae3ab4d
commit
eb09b0644b
1 file changed
+1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user