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

watcher cancel running watches #11

Closed
fkowal opened this issue Feb 28, 2019 · 0 comments · Fixed by #12
Closed

watcher cancel running watches #11

fkowal opened this issue Feb 28, 2019 · 0 comments · Fixed by #12

Comments

@fkowal
Copy link
Contributor

fkowal commented Feb 28, 2019

ConsulWatcher.stopWatchingEndpoint(String endpoint) limits the possibility to use the watcher concurrently.

When 2 threads start watches for the same endpoint, and one decides to cancel the "subscription" by running .stopWatchingEndpoint(String Endpoint) it results in canceling both subscriptions.

Or it introduces a race condition that results in leaving both subscriptions running.

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 a pull request may close this issue.

1 participant