diff --git a/rpc/src/v1/helpers/poll_manager.rs b/rpc/src/v1/helpers/poll_manager.rs index ab44dc35f..f367f669f 100644 --- a/rpc/src/v1/helpers/poll_manager.rs +++ b/rpc/src/v1/helpers/poll_manager.rs @@ -74,8 +74,8 @@ impl PollManager where T: Timer { } /// Removes poll info. - pub fn remove_poll(&mut self, id: &PollId) { - self.polls.remove(id); + pub fn remove_poll(&mut self, id: &PollId) -> bool { + self.polls.remove(id).is_some() } } diff --git a/rpc/src/v1/impls/eth_filter.rs b/rpc/src/v1/impls/eth_filter.rs index 0ff9f4c20..6c3d6837e 100644 --- a/rpc/src/v1/impls/eth_filter.rs +++ b/rpc/src/v1/impls/eth_filter.rs @@ -242,7 +242,6 @@ impl EthFilter for T { } fn uninstall_filter(&self, index: Index) -> Result { - self.polls().lock().remove_poll(&index.value()); - Ok(true) + Ok(self.polls().lock().remove_poll(&index.value())) } }