summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-connect-immediate-destroy.js
blob: 3ca58c356b44d1c81df317dc0fba7e706bada2d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
'use strict';
const common = require('../common');
const net = require('net');

const server = net.createServer();
server.listen(0);
const port = server.address().port;
const socket = net.connect(port, common.localhostIPv4, common.mustNotCall());
socket.on('error', common.mustNotCall());
server.close();
socket.destroy();