2015-05-19 19:00:06 +08:00
|
|
|
'use strict';
|
2012-07-14 03:11:38 +08:00
|
|
|
var common = require('../common');
|
|
|
|
var assert = require('assert');
|
|
|
|
|
|
|
|
var net = require('net');
|
|
|
|
var closed = false;
|
|
|
|
|
2015-10-07 12:12:45 +08:00
|
|
|
common.refreshTmpDir();
|
|
|
|
|
2012-07-14 03:11:38 +08:00
|
|
|
var s = net.Server();
|
|
|
|
s.listen(common.PIPE);
|
|
|
|
s.unref();
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
closed = true;
|
|
|
|
s.close();
|
|
|
|
}, 1000).unref();
|
|
|
|
|
|
|
|
process.on('exit', function() {
|
|
|
|
assert.strictEqual(closed, false, 'Unrefd socket should not hold loop open');
|
|
|
|
});
|