Skip to content

Commit

Permalink
feat: check existence of inspect port
Browse files Browse the repository at this point in the history
  • Loading branch information
anmisttt committed Apr 1, 2024
1 parent eda8053 commit 6ceba9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/worker_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,9 @@ class WorkerWrapper extends EventEmitterEx {
setImmediate(() => {
// this call of setup sets inspectPort for node js debugger
// it should be here so that every worker can receive the same debugger port after restarting
this._master.setup({inspectPort: this.inspectPort})

if (this.inspectPort) {
this._master.setup({inspectPort: this.inspectPort})
}
/** @private */
this._worker = cluster.fork({
port: this.options.port,
Expand Down

0 comments on commit 6ceba9e

Please sign in to comment.