mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-08 12:21:09 +03:00
Spawn connect_and_req calls (#296)
Avoids delays in connecting with long timeouts stalling the node.
This commit is contained in:
parent
bb7a61d284
commit
2a92eab675
1 changed files with 10 additions and 9 deletions
|
@ -197,6 +197,7 @@ impl Seeder {
|
||||||
debug!(LOGGER, "New peer address to connect to: {}.", peer_addr);
|
debug!(LOGGER, "New peer address to connect to: {}.", peer_addr);
|
||||||
let inner_h = h.clone();
|
let inner_h = h.clone();
|
||||||
if p2p_server.peer_count() < PEER_MAX_COUNT {
|
if p2p_server.peer_count() < PEER_MAX_COUNT {
|
||||||
|
h.spawn(
|
||||||
connect_and_req(
|
connect_and_req(
|
||||||
capab,
|
capab,
|
||||||
p2p_store.clone(),
|
p2p_store.clone(),
|
||||||
|
@ -204,9 +205,9 @@ impl Seeder {
|
||||||
inner_h,
|
inner_h,
|
||||||
peer_addr,
|
peer_addr,
|
||||||
)
|
)
|
||||||
} else {
|
)
|
||||||
|
};
|
||||||
Box::new(future::ok(()))
|
Box::new(future::ok(()))
|
||||||
}
|
|
||||||
});
|
});
|
||||||
Box::new(listener)
|
Box::new(listener)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue