mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
This commit is contained in:
committed by
Aiden McClelland
parent
2aa9b35e08
commit
9f1d140911
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user