Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool.terminate hangs when "Timeout: Did not receive an init message from worker" first #461

Open
kellyselden opened this issue Feb 7, 2023 · 0 comments

Comments

@kellyselden
Copy link
Contributor

I have some code like:

let err;
try {
  await pool.settled();
} catch (_err) {
  err = _err;
} finally {
  await pool.terminate(!!err);
}

It works when there are no errors, and when there is an "expected" error in one of the threads, but when the error is "Timeout: Did not receive an init message from worker ...", calling terminate hangs. I have the workaround:

  if (!err?.message?.startsWith('Timeout: Did not receive an init message from worker')) {
    await pool.terminate(!!err);
  }

which works, but it seems like an early exit inside terminate would be appropriate for a case like this. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant