diff --git a/src/net/connections.rs b/src/net/connections.rs index c94ad8a4..abfd0435 100644 --- a/src/net/connections.rs +++ b/src/net/connections.rs @@ -82,7 +82,6 @@ pub async fn maintain_connection( loop { tokio::time::sleep(tokio::time::Duration::from_secs(30)).await; if ping_last_pong.read().await.elapsed() > tokio::time::Duration::from_secs(60) { - println!("no Pong received for 60 seconds, killing the connection\r"); break; } if let Err(_) = ping_tx.send((NetworkMessage::Ping, None)) { @@ -148,12 +147,11 @@ pub async fn maintain_connection( }; match net_message { NetworkMessage::Pong => { - println!("net: got pong\r"); *last_pong.write().await = tokio::time::Instant::now(); continue; } NetworkMessage::Ping => { - println!("net: got ping\r"); + // respond with a Pong let _ = message_tx.send((NetworkMessage::Pong, None)); continue; } diff --git a/src/register b/src/register new file mode 160000 index 00000000..3f9cba36 --- /dev/null +++ b/src/register @@ -0,0 +1 @@ +Subproject commit 3f9cba362091ef0d6540e993d760fc89e312e47d