blob: 1f3e806aa99b7414f60ffc9dbb6e0d9cb68079c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
'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'
}))
);
|