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 canceling subscription in Watch #127

Merged
merged 2 commits into from
Aug 29, 2023
Merged

Fix canceling subscription in Watch #127

merged 2 commits into from
Aug 29, 2023

Conversation

DanG100
Copy link
Contributor

@DanG100 DanG100 commented Aug 28, 2023

No description provided.

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Pull Request Test Coverage Report for Build 6006345590

  • 8 of 9 (88.89%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 82.199%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ygnmi/ygnmi.go 8 9 88.89%
Totals Coverage Status
Change from base Build 5871178838: 0.03%
Covered Lines: 1921
Relevant Lines: 2337

💛 - Coveralls

ygnmi/ygnmi.go Outdated Show resolved Hide resolved
ygnmi/ygnmi.go Outdated Show resolved Hide resolved
Copy link
Contributor

@wenovus wenovus left a comment

Choose a reason for hiding this comment

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

So looks like we're saying we need the two goroutines to be able to cancel each other to avoid unnecessary work?

ygnmi/ygnmi.go Show resolved Hide resolved
@DanG100
Copy link
Contributor Author

DanG100 commented Aug 29, 2023

So looks like we're saying we need the two goroutines to be able to cancel each other to avoid unnecessary work?

We need to cancel the context passed to the subscribe RPC so that stream actually closes

@DanG100 DanG100 merged commit f1bc953 into main Aug 29, 2023
9 checks passed
@DanG100 DanG100 deleted the watch-fix branch August 29, 2023 16:19
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.

3 participants