mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
14 lines
309 B
JavaScript
14 lines
309 B
JavaScript
|
'use strict';
|
||
|
const common = require('../common');
|
||
|
const net = require('net');
|
||
|
|
||
|
const socket = new net.Socket();
|
||
|
socket.resetAndDestroy();
|
||
|
// Emit error if socket is not connecting/connected
|
||
|
socket.on('error', common.mustCall(
|
||
|
common.expectsError({
|
||
|
code: 'ERR_SOCKET_CLOSED',
|
||
|
name: 'Error'
|
||
|
}))
|
||
|
);
|