-
Notifications
You must be signed in to change notification settings - Fork 149
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
Don't call stream.end() on Watch ended by server #565
Conversation
Codecov Report
@@ Coverage Diff @@
## master #565 +/- ##
==========================================
- Coverage 95.85% 95.77% -0.08%
==========================================
Files 24 24
Lines 1931 1943 +12
Branches 168 168
==========================================
+ Hits 1851 1861 +10
- Misses 57 59 +2
Partials 23 23
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #565 +/- ##
==========================================
+ Coverage 95.85% 95.88% +0.02%
==========================================
Files 24 24
Lines 1931 1943 +12
Branches 168 168
==========================================
+ Hits 1851 1863 +12
Misses 57 57
Partials 23 23
Continue to review full report at Codecov.
|
I'm gonna leave this unmerged for a bit to give @mikelehen a chance to comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is part of #564
The changes in #564 to make
formattedName()
async changed a lot of the timing in the Watch code and uncovered an issue with the way we close streams. We should only callstream.end()
if the SDK closes the stream. If the server closes the stream we don't call end() - if we do, we get an exception (that was previously swallowed).This PR also introduces subclasses for Watch that provide the Target Proto and the Comaprator. This makes it possible to construct these after initialization time and to return a Promise.