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

fix(worker): throw exception with NaN as concurrency #2184

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

manast
Copy link
Contributor

@manast manast commented Sep 16, 2023

I got hinted that if you use NaN as a concurrency value the worker goes bananas. Here is a fix for it.

@@ -564,8 +568,6 @@ export class Worker<
if (!this.closing) {
await this.delay();
}
} finally {
this.waiting = null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's behind this deleted line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good question... must be the leftover of some testing I was doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have re-added it

@roggervalf roggervalf merged commit f36ac8b into master Sep 20, 2023
9 checks passed
@roggervalf roggervalf deleted the fix/throw-error-with-NaN-concurrency branch September 20, 2023 13:33
github-actions bot pushed a commit that referenced this pull request Sep 20, 2023
## [4.11.2](v4.11.1...v4.11.2) (2023-09-20)

### Bug Fixes

* **worker:** throw exception with NaN as concurrency ([#2184](#2184)) ([f36ac8b](f36ac8b))
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

Successfully merging this pull request may close these issues.

2 participants