-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
netIssues and PRs related to the net subsystem.Issues and PRs related to the net subsystem.
Description
The following test will fail since the client socket will emit 'end' and no ECONNRESET, even though the server called destroy() instead of end().
Platform: MacOS
'use strict';
const common = require('../common');
const net = require('net');
const assert = require('assert');
const server = net.createServer((socket) => {
socket.resume();
socket.on('close', common.mustCall(() => {
server.close();
}));
socket.on('end', common.mustNotCall());
socket.on('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'ECONNRESET');
}));
});
server.listen(0, () => {
const req = net.connect(server.address().port);
req.resume();
req.setTimeout(10, function() {
req.destroy();
});
});Metadata
Metadata
Assignees
Labels
netIssues and PRs related to the net subsystem.Issues and PRs related to the net subsystem.