fix race with chainHead single subscription ability

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2022-12-08 10:30:24 +00:00
parent ad6a1f2e68
commit 6c0448158d
2 changed files with 10 additions and 5 deletions
+1 -3
View File
@@ -891,8 +891,7 @@ impl<T: Config> Rpc<T> {
.await?;
println!("Dropping subscription");
// Manually cancel the susbcription
// {"id": 1, "method": "eth_unsubscribe", "params": ["0xcd0c3e8af590364c09d0fa6a1210faf5"]}
drop(sub);
let result: bool = self
.client
@@ -902,7 +901,6 @@ impl<T: Config> Rpc<T> {
)
.await?;
println!("Subscription dropped with result={:?}", result);
drop(sub);
(bytes, event)
};