mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-18 23:59:06 +02:00
fixes related to recent tokio changes (#640)
This commit is contained in:
@@ -319,9 +319,13 @@ impl Client {
|
||||
if Handle::try_current().is_ok() {
|
||||
let rt = RUNTIME.clone();
|
||||
let client = self.clone();
|
||||
std::thread::spawn(move || rt.lock().unwrap().block_on(client.send_request_async(req)))
|
||||
.join()
|
||||
.unwrap()
|
||||
std::thread::spawn(move || {
|
||||
rt.lock()
|
||||
.unwrap()
|
||||
.block_on(async { client.send_request_async(req).await })
|
||||
})
|
||||
.join()
|
||||
.unwrap()
|
||||
} else {
|
||||
RUNTIME
|
||||
.lock()
|
||||
|
||||
Reference in New Issue
Block a user