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: David's avatarDavid <dvdplm@gmail.com>

* Update core/src/server/rpc_module.rs
Co-authored-by: David's avatarDavid <dvdplm@gmail.com>

* grumbles: use unwrap in tests

* add test for reuse pipe_from_stream
Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
parent 9decd23c
Pipeline #191160 passed with stages
in 4 minutes and 57 seconds