1'use strict'; 2const common = require('../common'); 3const net = require('net'); 4 5const server = net.createServer(); 6server.listen(0); 7const port = server.address().port; 8const socket = net.connect(port, common.localhostIPv4, common.mustNotCall()); 9socket.on('error', common.mustNotCall()); 10server.close(); 11socket.resetAndDestroy(); 12// `reset` waiting socket connected to sent the RST packet 13socket.destroy(); 14