summaryrefslogtreecommitdiff
path: root/lib/http2.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-08-11 23:39:38 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2011-08-11 23:39:38 +0200
commiteb09b0644b3cb910d318d1d2a80cd2215b63cdcc (patch)
treeff3c71ed683d697f45f55c775121ceee60bef79b /lib/http2.js
parent3d4ae3ab4dfa4790ff3eefd1990ae08e7b1d3e97 (diff)
downloadandroid-node-v8-eb09b0644b3cb910d318d1d2a80cd2215b63cdcc.tar.gz
android-node-v8-eb09b0644b3cb910d318d1d2a80cd2215b63cdcc.tar.bz2
android-node-v8-eb09b0644b3cb910d318d1d2a80cd2215b63cdcc.zip
http: destroy socket on error
Needs further investigation, the test passed without `--use-uv`. Fixes failing test: test/simple/test-http-dns-fail.js
Diffstat (limited to 'lib/http2.js')
-rw-r--r--lib/http2.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/http2.js b/lib/http2.js
index be2c9596eb..8a5d83adfe 100644
--- a/lib/http2.js
+++ b/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);