From d519c4615944019fcdfafdb5630dea49d12f708b Mon Sep 17 00:00:00 2001 From: narodnik Date: Mon, 21 Mar 2022 19:20:43 +0100 Subject: [PATCH] add todo task for net --- src/net/protocol/protocol_ping.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net/protocol/protocol_ping.rs b/src/net/protocol/protocol_ping.rs index c926ff09c..8b24ddab9 100644 --- a/src/net/protocol/protocol_ping.rs +++ b/src/net/protocol/protocol_ping.rs @@ -75,12 +75,14 @@ impl ProtocolPing { // Wait for pong, check nonce matches. let pong_msg = self.pong_sub.receive().await?; if pong_msg.nonce != nonce { + // TODO: this is too extreme error!("Wrong nonce for ping reply. Disconnecting from channel."); self.channel.stop().await; return Err(Error::ChannelStopped) } let duration = start.elapsed().as_millis(); - debug!(target: "net", "Received Pong message {}ms from [{:?}]", duration, self.channel.address()); + debug!(target: "net", "Received Pong message {}ms from [{:?}]", + duration, self.channel.address()); } }