Unverified Commit 8e945de4 authored by Niklas Adolfsson's avatar Niklas Adolfsson Committed by GitHub
Browse files

fix(rpc module): close subscription task when a subscription is `unsubscribed`...

fix(rpc module): close subscription task when a subscription is `unsubscribed` via the `unsubscribe call` (#743)

* refactor: remove SubscriptionSink::inner_send

* fix: close running task if unsubscribed

* Update core/src/server/rpc_module.rs

* Update core/src/server/rpc_module.rs

* fix nits

* Update core/src/server/rpc_module.rs

* add test for canceling subscriptions

* print subscription info; once per minute

* revert closure stuff

* Revert "print subscription info; once per minute"

This reverts commit 366176a8

.

* use tokio::sync::watch instead of oneshot

The receiver is clonable and it's possible to check whether the sender is still alive

* Update tests/tests/helpers.rs

Co-authored-by: default avatarDavid <[email protected]>

* Update core/src/server/rpc_module.rs

Co-authored-by: default avatarDavid <[email protected]>

* grumbles: use unwrap in tests

* add test for reuse pipe_from_stream

Co-authored-by: default avatarDavid <[email protected]>
parent 9decd23c
Pipeline #191160 passed with stages
in 4 minutes and 57 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment