mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 12:54:43 +00:00

The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
23 lines
382 B
JavaScript
23 lines
382 B
JavaScript
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++;
|
|
});
|