Unverified Commit 99ffeb7b authored by Alexandru Vasile's avatar Alexandru Vasile
Browse files

Submit `InvalidParams` if sink was never accepted

Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
parent 1f66edf1
......@@ -1288,7 +1288,10 @@ impl SubscriptionSink {
impl Drop for SubscriptionSink {
fn drop(&mut self) {
if self.is_active_subscription() {
// Subscription was never accepted.
if let Ok(id) = self.state.id() {
self.inner.send_error(id, ErrorCode::InvalidParams.into());
} else if self.is_active_subscription() {
Supports Markdown
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