diff --git a/test/run_pass/issue/issue-266.js b/test/run_pass/issue/issue-266.js index 51ccd98e5e..4f6541c7cb 100644 --- a/test/run_pass/issue/issue-266.js +++ b/test/run_pass/issue/issue-266.js @@ -21,11 +21,11 @@ var assert = require('assert'); var server = net.createServer(); var port = 30266; -var server = net.createServer(); server.listen(port); server.on('connection', function(socket) { socket.on('data', function(data) { + server.close() }); socket.on('finish', function() { socket.destroy(); @@ -34,12 +34,6 @@ server.on('connection', function(socket) { }); }); - -setTimeout(function() { - server.close(); -}, 1000); - - var socket = new net.Socket(); socket.connect(port, "127.0.0.1"); socket.end('test');