Skip to content

Commit

Permalink
fix: worker_threads mode without ports (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjfkai committed Dec 19, 2022
1 parent 5a656e4 commit a088e99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/utils/mode/impl/worker_threads/app.js
Expand Up @@ -156,7 +156,10 @@ class AppUtils extends BaseAppUtils {
this.startSuccessCount = 0;

const ports = this.options.ports;
this.options.workers = ports.length ? ports.length : 1;
if (!ports.length) {
ports.push(this.options.port);
}
this.options.workers = ports.length;
let i = 0;
do {
const options = Object.assign({}, this.options, { port: ports[i] });
Expand Down

0 comments on commit a088e99

Please sign in to comment.