mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
a57da278f8
Socket should always emit 'close'. Regardless whether it has been connected or not. PR-URL: https://github.com/nodejs/node/pull/29803 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
8 lines
170 B
JavaScript
8 lines
170 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const net = require('net');
|
|
|
|
const socket = new net.Socket();
|
|
socket.on('close', common.mustCall());
|
|
socket.destroy();
|