11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst net = require('net'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciconst server = net.createServer(); 61cb0ef41Sopenharmony_ciserver.listen(0); 71cb0ef41Sopenharmony_ciconst port = server.address().port; 81cb0ef41Sopenharmony_ciconst socket = net.connect(port, common.localhostIPv4, common.mustNotCall()); 91cb0ef41Sopenharmony_cisocket.on('error', common.mustNotCall()); 101cb0ef41Sopenharmony_ciserver.close(); 111cb0ef41Sopenharmony_cisocket.resetAndDestroy(); 121cb0ef41Sopenharmony_ci// `reset` waiting socket connected to sent the RST packet 131cb0ef41Sopenharmony_cisocket.destroy(); 14