summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-socket-destroy-twice.js
blob: 917e9849999b05dbbcc2fa25c800165a01f98ce0 (plain)
1
2
3
4
5
6
7
8
9
10
11
'use strict';
var common = require('../common');
var net = require('net');

var conn = net.createConnection(common.PORT);

conn.on('error', common.mustCall(function() {
  conn.destroy();
}));

conn.on('close', common.mustCall(function() {}));