|
@@ -166,7 +166,7 @@ async fn ping_node_impl(addr: Url, p2p: P2pPtr) -> bool {
|
|
|
match connector.connect(&addr).await {
|
|
match connector.connect(&addr).await {
|
|
|
Ok((_url, channel)) => {
|
|
Ok((_url, channel)) => {
|
|
|
debug!(target: "net::refinery::ping_node()", "Connected successfully!");
|
|
debug!(target: "net::refinery::ping_node()", "Connected successfully!");
|
|
|
- // First initialize the version protocol and its Version, Verack subscribers.
|
|
|
|
|
|
|
+ // First initialize the version protocol and its Version, Verack subscribers.
|
|
|
let proto_ver = ProtocolVersion::new(channel.clone(), p2p.settings()).await;
|
|
let proto_ver = ProtocolVersion::new(channel.clone(), p2p.settings()).await;
|
|
|
|
|
|
|
|
// Then run the version exchange, store the channel and subscribe to a stop signal.
|
|
// Then run the version exchange, store the channel and subscribe to a stop signal.
|
|
@@ -184,7 +184,7 @@ async fn ping_node_impl(addr: Url, p2p: P2pPtr) -> bool {
|
|
|
let result = timeout(Duration::from_secs(5), handshake_task).await;
|
|
let result = timeout(Duration::from_secs(5), handshake_task).await;
|
|
|
|
|
|
|
|
channel.stop().await;
|
|
channel.stop().await;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
match result {
|
|
match result {
|
|
|
Ok(_) => {
|
|
Ok(_) => {
|
|
|
debug!(target: "net::refinery::ping_node()", "Handshake success!");
|
|
debug!(target: "net::refinery::ping_node()", "Handshake success!");
|