From da14947227a8758eea92f171001019b9c2e8c3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Wed, 13 Mar 2024 11:32:57 +0000 Subject: [PATCH] decreased logging level of gateway errors associated with the websocket --- .../websocket/connection_handler/authenticated.rs | 8 ++++---- .../client_handling/websocket/connection_handler/fresh.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs b/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs index 6c9456224b..dbd5d28e7d 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs @@ -600,7 +600,7 @@ where None => break, Some(Ok(socket_msg)) => socket_msg, Some(Err(err)) => { - error!("failed to obtain message from websocket stream! stopping connection handler: {err}"); + debug!("failed to obtain message from websocket stream! stopping connection handler: {err}"); break; } }; @@ -611,7 +611,7 @@ where if let Some(response) = self.handle_request(socket_msg).await { if let Err(err) = self.inner.send_websocket_message(response).await { - warn!( + debug!( "Failed to send message over websocket: {err}. Assuming the connection is dead.", ); break; @@ -621,13 +621,13 @@ where mix_messages = self.mix_receiver.next() => { let mix_messages = match mix_messages { None => { - warn!("mix receiver was closed! Assuming the connection is dead."); + debug!("mix receiver was closed! Assuming the connection is dead."); break; } Some(mix_messages) => mix_messages, }; if let Err(err) = self.inner.push_packets_to_client(&self.client.shared_keys, mix_messages).await { - warn!("failed to send the unwrapped sphinx packets back to the client - {err}, assuming the connection is dead"); + debug!("failed to send the unwrapped sphinx packets back to the client - {err}, assuming the connection is dead"); break; } } diff --git a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs index 46dc7f5f80..93ef0508fd 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs @@ -667,7 +667,7 @@ where let msg = match msg { Ok(msg) => msg, Err(err) => { - error!("failed to obtain message from websocket stream! stopping connection handler: {err}"); + debug!("failed to obtain message from websocket stream! stopping connection handler: {err}"); break; } }; @@ -723,7 +723,7 @@ where Message::Binary(_) => { // perhaps logging level should be reduced here, let's leave it for now and see what happens // if client is working correctly, this should have never happened - warn!("possibly received a sphinx packet without prior authentication. Request is going to be ignored"); + debug!("possibly received a sphinx packet without prior authentication. Request is going to be ignored"); if let Err(err) = self .send_websocket_message( ServerResponse::new_error(