From 9f1d140911266f33b46da36f93fe298c4020defd Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Wed, 24 Nov 2021 12:45:32 -0700 Subject: [PATCH] #820 --- appmgr/src/db/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/appmgr/src/db/mod.rs b/appmgr/src/db/mod.rs index de4d51d83..f2644b612 100644 --- a/appmgr/src/db/mod.rs +++ b/appmgr/src/db/mod.rs @@ -143,7 +143,14 @@ async fn deal_with_messages( .with_kind(crate::ErrorKind::Network)?; } message = stream.next().fuse() => { - match message.transpose().with_kind(crate::ErrorKind::Network)? { + let message = match message.transpose() { + Err(tokio_tungstenite::tungstenite::Error::ConnectionClosed) => { + tracing::info!("Closing WebSocket: Reason: {}", tokio_tungstenite::tungstenite::Error::ConnectionClosed); + return Ok(()) + } + a => a, + }.with_kind(crate::ErrorKind::Network)?; + match message { Some(Message::Ping(a)) => { stream .send(Message::Pong(a))