-
Notifications
You must be signed in to change notification settings - Fork 332
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 bug in event monitor where subscriptions would not be terminated properly on WebSocket error #290
Conversation
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Codecov Report
@@ Coverage Diff @@
## master #290 +/- ##
=========================================
+ Coverage 13.6% 37.1% +23.4%
=========================================
Files 69 120 +51
Lines 3752 7743 +3991
Branches 1374 2734 +1360
=========================================
+ Hits 513 2875 +2362
- Misses 2618 4561 +1943
+ Partials 621 307 -314
Continue to review full report at Codecov.
|
FYI, cargo build on master fails following the work in this PR:
LE: had to do a cargo update and cleanup, then build worked! |
…properly on WebSocket error (informalsystems#290) * Store the combined stream of all subscriptions within the EventMonitor * Explicitly close the WebSocket client when this one fails to ensure that subscriptions are terminated * Fix event type in Tx subscription * Fix build for latest tendermint-rs master * Formatting Co-authored-by: Thane Thomson <connect@thanethomson.com>
Closes: #293
Description
This PR fixes a potential bug where subscriptions would not be terminated properly if the WebSocket client encountered an error because
a) we were emptying the
subscriptions
vector when passing it toselect_all
, andb) we were not closing the client explicitly
To test this PR:
Use the following configuration file:
In one terminal, spawn a Tendermint node running the KV Store app:
In another terminal, from the
relayer-cli
folder, run thelisten
command of the relayer:Expected output:
For contributor use:
docs/
) and code commentsFiles changed
in the Github PR explorer