Skip to content

Commit 3fe54a6

Browse files
Jasper De Moordevongovett
authored andcommitted
return early instead of throwing (#1260)
1 parent 9064b3b commit 3fe54a6

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/workerfarm/Worker.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ class Worker extends EventEmitter {
111111
} else if (type === 'response') {
112112
let call = this.calls.get(idx);
113113
if (!call) {
114-
throw new Error(
115-
`Worker Farm: Received message for unknown index for existing child. This should not happen!`
116-
);
114+
// Return for unknown calls, these might accur if a third party process uses workers
115+
return;
117116
}
118117

119118
if (contentType === 'error') {

0 commit comments

Comments
 (0)