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

Bugfix/dont add failed emitters on observer schedule #872

Conversation

IlayRosenberg
Copy link
Contributor

If a watch is being scheduled on a started observer, and the emitter start functions fails for some reason, future schedules of watches on the same path will "succeed" (won't raise), but no emitter thread will be started and no events will be reported. This is because the emitter is added to the observer's context before it is being started, and isn't removed on failure (it does on observer.start(), but not on observer.schedule()).
I simply moved the line that adds the emitter to the observer's local context to after the line that starts it, so in case it raises it will be before the emitter was added to the observer context

@BoboTiG
Copy link
Collaborator

BoboTiG commented May 12, 2022

Sorry for the delay @IlayRosenberg, I'll review your PR shortly.

@BoboTiG BoboTiG merged commit 0ab956e into gorakhargosh:master May 13, 2022
@BoboTiG
Copy link
Collaborator

BoboTiG commented May 13, 2022

Thanks a lot @IlayRosenberg ! 🍾

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.

None yet

2 participants