diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2011-07-22 03:23:50 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-07-22 03:23:50 +0400 |
commit | 984dc057e39b09443cb31345b256b596509a588d (patch) | |
tree | 52f315adbc106fe719339ba50da09733e02ae9cd /test | |
parent | 345df289eb775aa2c195056ab88adf2c6ab95d66 (diff) |
net_uv: throw if Server.prototype.close() is called twice
Follows net_legacy behaviour.
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-http-unix-socket.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/simple/test-http-unix-socket.js b/test/simple/test-http-unix-socket.js index 2a002332f5c..857ef6e32bd 100644 --- a/test/simple/test-http-unix-socket.js +++ b/test/simple/test-http-unix-socket.js @@ -75,8 +75,12 @@ server.listen(common.PIPE, function() { }); process.on('exit', function() { - server.close(); assert.ok(status_ok); assert.ok(headers_ok); assert.ok(body_ok); + + // Double close should throw. Follows net_legacy behaviour. + assert.throws(function() { + server.close(); + }); }); |