mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-24 00:53:37 +03:00
remove prints
This commit is contained in:
parent
197e1fed4a
commit
b20edde54a
@ -82,7 +82,6 @@ pub async fn maintain_connection(
|
|||||||
loop {
|
loop {
|
||||||
tokio::time::sleep(tokio::time::Duration::from_secs(30)).await;
|
tokio::time::sleep(tokio::time::Duration::from_secs(30)).await;
|
||||||
if ping_last_pong.read().await.elapsed() > tokio::time::Duration::from_secs(60) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
if let Err(_) = ping_tx.send((NetworkMessage::Ping, None)) {
|
if let Err(_) = ping_tx.send((NetworkMessage::Ping, None)) {
|
||||||
@ -148,12 +147,11 @@ pub async fn maintain_connection(
|
|||||||
};
|
};
|
||||||
match net_message {
|
match net_message {
|
||||||
NetworkMessage::Pong => {
|
NetworkMessage::Pong => {
|
||||||
println!("net: got pong\r");
|
|
||||||
*last_pong.write().await = tokio::time::Instant::now();
|
*last_pong.write().await = tokio::time::Instant::now();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
NetworkMessage::Ping => {
|
NetworkMessage::Ping => {
|
||||||
println!("net: got ping\r");
|
// respond with a Pong
|
||||||
let _ = message_tx.send((NetworkMessage::Pong, None));
|
let _ = message_tx.send((NetworkMessage::Pong, None));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
1
src/register
Submodule
1
src/register
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 3f9cba362091ef0d6540e993d760fc89e312e47d
|
Loading…
Reference in New Issue
Block a user