client: Implement `notify_on_disconnect` (#837)
* client: Implement `notify_on_disconnect` Signed-off-by:Alexandru Vasile <alexandru.vasile@parity.io> * Revert "client: Implement `notify_on_disconnect`" This reverts commit c8ffaa4c . * client: Rely on `tokio::sync::mpsc::Sender` to notify on disconnect Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Implement `InternalError` for tokio and futures_channel's SendError Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Remove tokio-stream dependency Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Rename `notify_on_disconnect` to `on_disconnect` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Add `tokio/sync` as dependency of client feature Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * wasm-client: Use `tokio::sync::mpsc::channel` for notify on disconnect Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Add tokio/sync dependency to satisfy `--no-default-features` check Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Best effort to close channel on client drops Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * revert to: client: Implement `notify_on_disconnect` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Replace tokio/sync with oneshot channel Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Check `client.on_disconnect()` returns when server shuts down Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Fix comment typo Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Call `on_disconnect()` multiple times Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Call `on_disconnect` with closed server Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
Please register or sign in to comment