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: avoid calling delay() if queue is being closed #1295

Merged
merged 2 commits into from
Jun 26, 2022

Conversation

snawaz
Copy link
Contributor

@snawaz snawaz commented Jun 25, 2022

One easy way to fix this: #1294

Please advise if there is any better way.

@@ -468,7 +469,9 @@ export class Worker<
if (isNotConnectionError(<Error>error)) {
this.emit('error', <Error>error);
}
await this.delay();
if (!this.beingClosed) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

hi @snawaz, did you try to use !this.closing instead of this new attribute?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@roggervalf : ah, that makes sense. I just removed the new variable and used this.closing itself.

@manast manast merged commit 52a5045 into taskforcesh:master Jun 26, 2022
github-actions bot pushed a commit that referenced this pull request Jun 26, 2022
## [1.86.3](v1.86.2...v1.86.3) (2022-06-26)

### Bug Fixes

* avoid calling delay() if queue is being closed ([#1295](#1295)) ([52a5045](52a5045))
@github-actions
Copy link

🎉 This PR is included in version 1.86.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@snawaz snawaz deleted the avoid-delay branch June 26, 2022 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants