| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8a9243a commit 096e337
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ | |||
| 20 | 20 | // USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| 21 | 21 | ||
| 22 | 22 | 'use strict'; | |
| 23 | - const common = require('../common'); | ||
| 23 | + require('../common'); | ||
| 24 | 24 | const assert = require('assert'); | |
| 25 | 25 | const fork = require('child_process').fork; | |
| 26 | 26 | const net = require('net'); | |
@@ -79,7 +79,7 @@ if (process.argv[2] === 'child') { | |||
| 79 | 79 | server.on('listening', function() { | |
| 80 | 80 | let j = count; | |
| 81 | 81 | while (j--) { | |
| 82 | - const client = net.connect(common.PORT, '127.0.0.1'); | ||
| 82 | + const client = net.connect(server.address().port, '127.0.0.1'); | ||
| 83 | 83 | client.on('close', function() { | |
| 84 | 84 | disconnected += 1; | |
| 85 | 85 | }); | |
@@ -110,7 +110,7 @@ if (process.argv[2] === 'child') { | |||
| 110 | 110 | closeEmitted = true; | |
| 111 | 111 | }); | |
| 112 | 112 | ||
| 113 | - server.listen(common.PORT, '127.0.0.1'); | ||
| 113 | + server.listen(0, '127.0.0.1'); | ||
| 114 | 114 | ||
| 115 | 115 | process.on('exit', function() { | |
| 116 | 116 | assert.strictEqual(sent, count); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments