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

Commit

Permalink
Browse files Browse the repository at this point in the history
test: Don't reuse common.PORT in test-child-process-fork-net
This fixes #3447
  • Loading branch information
isaacs committed Jun 16, 2012
1 parent 41421ff commit d614d16
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/simple/test-child-process-fork-net.js
Expand Up @@ -157,8 +157,15 @@ if (process.argv[2] === 'child') {
console.log('PARENT: server closed');
callback();
});
server.listen(common.PORT, function() {
var connect = net.connect(common.PORT);
// don't listen on the same port, because SmartOS sometimes says
// that the server's fd is closed, but it still cannot listen
// on the same port again.
//
// An isolated test for this would be lovely, but for now, this
// will have to do.
server.listen(common.PORT + 1, function() {
console.error('testSocket, listening');
var connect = net.connect(common.PORT + 1);
var store = '';
connect.on('data', function(chunk) {
store += chunk;
Expand Down

0 comments on commit d614d16

Please sign in to comment.