We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1665a93 commit e573c39Copy full SHA for e573c39
lib/_http_client.js
@@ -406,9 +406,6 @@ function socketErrorListener(err) {
406
req.emit('error', err);
407
}
408
409
- // Handle any pending data
410
- socket.read();
411
-
412
const parser = socket.parser;
413
if (parser) {
414
parser.finish();
test/parallel/test-http-client-read-in-error.js
@@ -1,5 +1,5 @@
1
'use strict';
2
-require('../common');
+const common = require('../common');
3
const net = require('net');
4
const http = require('http');
5
@@ -37,4 +37,5 @@ http.request({
37
agent
38
}).once('error', function() {
39
console.log('ignore');
40
+ this.on('data', common.mustNotCall());
41
});
0 commit comments