mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
One more test with a race condition fixed
This commit is contained in:
1 parent
d8642a8aa6
commit
0e8d858aba
1 file changed
+8
-6
@@ -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