mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
One more test with a race condition fixed
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user