Files
Kmake/test/parallel/test-net-connect-immediate-destroy.js

12 lines
323 B
JavaScript
Raw Permalink Normal View History

2026-05-26 23:36:42 -07:00
'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();