mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 06:11:07 +00:00
core: use current_thread tokio runtime to poll network to proto channel (#2531)
This commit is contained in:
@@ -673,7 +673,7 @@ pub trait TestNetFactory: Sized {
|
|||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
tokio::run(futures::future::poll_fn(move || {
|
tokio::runtime::current_thread::run(futures::future::poll_fn(move || {
|
||||||
while let Async::Ready(msg) = network_to_protocol_rx.poll().unwrap() {
|
while let Async::Ready(msg) = network_to_protocol_rx.poll().unwrap() {
|
||||||
match msg {
|
match msg {
|
||||||
Some(FromNetworkMsg::PeerConnected(peer_id, debug_msg)) =>
|
Some(FromNetworkMsg::PeerConnected(peer_id, debug_msg)) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user