| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1abe1d1 commit d8f5f55
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,9 +48,14 @@ if (cluster.isMaster) { | |||
| 48 | 48 | workers.set(i, worker); | |
| 49 | 49 | } | |
| 50 | 50 | } else { | |
| 51 | + // As the cluster member has the potential to grab any port | ||
| 52 | + // from the environment, this can cause collision when master | ||
| 53 | + // obtains the port from cluster member and tries to listen on. | ||
| 54 | + // So move this to sequential, and provide a static port. | ||
| 55 | + // Refs: https://github.com/nodejs/node/issues/25813 | ||
| 51 | 56 | net.createServer().listen({ | |
| 52 | - host, | ||
| 53 | - port: 0, | ||
| 57 | + host: host, | ||
| 58 | + port: common.PORT, | ||
| 54 | 59 | ipv6Only: true, | |
| 55 | 60 | }, common.mustCall()); | |
| 56 | 61 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments