-
Notifications
You must be signed in to change notification settings - Fork 148
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: Use new stream rather than pipe #700
Conversation
5309534
to
40a510c
Compare
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.
Thanks! Since this is a seemingly unrelated fix to #661, can you explain what you are doing in the PR description?
code = change.cause.code!; | ||
message = change.cause.message!; | ||
} | ||
// @todo: Surface a .code property on the exception. |
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.
I think we may have now earned a Moma badge by moving this TODO around more than 10 times :)
Codecov Report
@@ Coverage Diff @@
## master #700 +/- ##
=========================================
- Coverage 96.23% 96.2% -0.03%
=========================================
Files 20 20
Lines 2230 2215 -15
Branches 470 470
=========================================
- Hits 2146 2131 -15
Misses 20 20
Partials 64 64
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #700 +/- ##
==========================================
- Coverage 96.23% 96.07% -0.17%
==========================================
Files 20 20
Lines 2230 2215 -15
Branches 470 470
==========================================
- Hits 2146 2128 -18
- Misses 20 22 +2
- Partials 64 65 +1
Continue to review full report at Codecov.
|
Fixes #661.
We use a single long-lived stream for all of our logic. If the backend streams drops, we unpipe the old stream and pipe and new stream. After many re-connects, it seems to cause EventEmitter leaks (#661). By using new streams rather than piping/unpiping a long-lived stream, the
MaxListenersExceededWarning
should no longer appear.