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.
24 lines
552 B
JavaScript
24 lines
552 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
var net = require('net');
|
|
|
|
var client, killed = false, ended = false;
|
|
var TIMEOUT = 10 * 1000
|
|
|
|
client = net.createConnection(53, '8.8.8.8', function() {
|
|
client.unref();
|
|
});
|
|
|
|
client.on('close', function() {
|
|
ended = true;
|
|
});
|
|
|
|
setTimeout(function() {
|
|
killed = true;
|
|
client.end();
|
|
}, TIMEOUT).unref();
|
|
|
|
process.on('exit', function() {
|
|
assert.strictEqual(killed, false, 'A client should have connected');
|
|
assert.strictEqual(ended, false, 'A client should stay connected');
|
|
});
|