mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
When restarting client, also "restart" tokio runtime (#1065)
* remember new tokio runtime on reconnect * compilation
This commit is contained in:
committed by
Bastian Köcher
parent
63d6fc436a
commit
09d30894d1
@@ -125,7 +125,9 @@ impl<C: Chain> Client<C> {
|
||||
|
||||
/// Reopen client connection.
|
||||
pub async fn reconnect(&mut self) -> Result<()> {
|
||||
self.client = Self::build_client(self.params.clone()).await?.1;
|
||||
let (tokio, client) = Self::build_client(self.params.clone()).await?;
|
||||
self.tokio = tokio;
|
||||
self.client = client;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user