Просмотр исходного кода

net: call channel.stop() when we get a handshake error on ping_node

lunar-mining 2 лет назад
Родитель
Сommit
1a282a951d
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/net/hosts/refinery.rs

+ 1 - 0
src/net/hosts/refinery.rs

@@ -135,6 +135,7 @@ pub async fn ping_node(addr: &Url, p2p: P2pPtr) -> bool {
                 }
                 Err(e) => {
                     debug!(target: "net::refinery::ping_node()", "Handshake failure! {}", e);
+                    channel.stop().await;
                     false
                 }
             }