Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
One more test with a race condition fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus authored and ry committed Aug 13, 2010
1 parent d8642a8 commit 0e8d858
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/simple/test-http-eof-on-connect.js
Expand Up @@ -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();
});
});

0 comments on commit 0e8d858

Please sign in to comment.