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 subscriber logic when closed #4536

Merged
merged 1 commit into from
Oct 21, 2015
Merged

fix subscriber logic when closed #4536

merged 1 commit into from
Oct 21, 2015

Conversation

nathanielc
Copy link
Contributor

The logic for detecting the closed service was broken. Fixed and added a test.

Also update logging to only log when something changes instead of any time it checks for a change.

@@ -100,9 +100,10 @@ func (s *Service) waitForMetaUpdates() {
} else {
//Check that we haven't been closed before performing update.
s.mu.Lock()
if !s.closed {
if s.closed {
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense, though I think closed should also be set to true in New Service.

@otoolep
Copy link
Contributor

otoolep commented Oct 21, 2015

+1 on green, with suggested improvement.

nathanielc pushed a commit that referenced this pull request Oct 21, 2015
@nathanielc nathanielc merged commit 81d90ef into master Oct 21, 2015
@nathanielc nathanielc deleted the nc-fix-subscriptions branch October 21, 2015 21:21
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