One more test with a race condition fixed

This commit is contained in:
Bert Belder authored and Ryan Dahl committed 2010-08-13 07:18:38 -07:00
1 parent d8642a8aa6
commit 0e8d858aba
1 file changed
+8 -6
+8 -6
View File
@@ -7,11 +7,13 @@ http = require("http");
// It is separate from test-http-malformed-request.js because it is only
// reproduceable on the first packet on the first connection to a server.
server = http.createServer(function (req, res) {});
var server = http.createServer(function (req, res) {});
server.listen(common.PORT);
net.createConnection(common.PORT).addListener("connect", function () {
this.close();
}).addListener("close", function () {
server.close();
});
server.addListener("listening", function() {
net.createConnection(common.PORT).addListener("connect", function () {
this.close();
}).addListener("close", function () {
server.close();
});
});