mirror of
https://github.com/nodejs/node.git
synced 2025-05-04 13:07:46 +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.
24 lines
500 B
JavaScript
24 lines
500 B
JavaScript
var common = require('../common');
|
|
var net = require('net');
|
|
var assert = require('assert');
|
|
|
|
var timedout = false;
|
|
|
|
var server = net.Server();
|
|
server.listen(common.PORT, function() {
|
|
var socket = net.createConnection(common.PORT);
|
|
socket.setTimeout(100, function() {
|
|
timedout = true;
|
|
socket.destroy();
|
|
server.close();
|
|
clearTimeout(timer);
|
|
});
|
|
var timer = setTimeout(function() {
|
|
process.exit(1);
|
|
}, 200);
|
|
});
|
|
|
|
process.on('exit', function() {
|
|
assert.ok(timedout);
|
|
});
|