You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
396 B

'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
var nerrors = 0;
var ncloses = 0;
process.on('exit', function() {
assert.equal(nerrors, 1);
assert.equal(ncloses, 1);
});
var conn = net.createConnection(common.PORT);
conn.on('error', function() {
nerrors++;
conn.destroy();
});
conn.on('close', function() {
ncloses++;
});