mirror of https://github.com/lukechilds/node.git
Browse Source
PR-URL: https://github.com/iojs/io.js/pull/609 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com>v1.8.0-commit
committed by
Ben Noordhuis
2 changed files with 21 additions and 1 deletions
@ -0,0 +1,20 @@ |
|||
var assert = require('assert'); |
|||
var common = require('../common'); |
|||
var net = require('net'); |
|||
|
|||
var server = net.createServer(assert.fail); |
|||
var closeEvents = 0; |
|||
|
|||
server.on('close', function() { |
|||
++closeEvents; |
|||
}); |
|||
|
|||
server.listen(common.PORT, function() { |
|||
assert(false); |
|||
}); |
|||
|
|||
server.close('bad argument'); |
|||
|
|||
process.on('exit', function() { |
|||
assert.equal(closeEvents, 1); |
|||
}); |
Loading…
Reference in new issue