|
@@ -174,13 +174,13 @@ async fn ping_node_impl(addr: Url, p2p: P2pPtr) -> bool {
|
|
|
p2p.executor(),
|
|
p2p.executor(),
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ channel.clone().start(p2p.executor());
|
|
|
|
|
+
|
|
|
// Ensure the channel gets stopped by adding a timeout to the handshake. Otherwise if
|
|
// Ensure the channel gets stopped by adding a timeout to the handshake. Otherwise if
|
|
|
// the handshake does not finish channel.stop() will never get called, resulting in
|
|
// the handshake does not finish channel.stop() will never get called, resulting in
|
|
|
// zombie processes.
|
|
// zombie processes.
|
|
|
let result = timeout(Duration::from_secs(5), handshake_task).await;
|
|
let result = timeout(Duration::from_secs(5), handshake_task).await;
|
|
|
|
|
|
|
|
- channel.clone().start(p2p.executor());
|
|
|
|
|
-
|
|
|
|
|
match result {
|
|
match result {
|
|
|
Ok(_) => {
|
|
Ok(_) => {
|
|
|
debug!(target: "net::refinery::ping_node()", "Handshake success! Stopping channel.");
|
|
debug!(target: "net::refinery::ping_node()", "Handshake success! Stopping channel.");
|