mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-23 16:43:24 +03:00
remove prints
This commit is contained in:
parent
197e1fed4a
commit
b20edde54a
@ -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;
|
||||
}
|
||||
|
1
src/register
Submodule
1
src/register
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3f9cba362091ef0d6540e993d760fc89e312e47d
|
Loading…
Reference in New Issue
Block a user