diff --git a/veilid-core/src/network_manager/native/protocol/ws.rs b/veilid-core/src/network_manager/native/protocol/ws.rs index 72179b53..4f78fda0 100644 --- a/veilid-core/src/network_manager/native/protocol/ws.rs +++ b/veilid-core/src/network_manager/native/protocol/ws.rs @@ -78,8 +78,8 @@ where pub async fn recv(&self) -> Result, String> { let out = match self.stream.clone().next().await { Some(Ok(Message::Binary(v))) => v, - Some(Ok(_)) => { - return Err("Unexpected WS message type".to_owned()).map_err(logthru_net!(error)); + Some(Ok(x)) => { + return Err(format!("Unexpected WS message type: {:?}", x)); } Some(Err(e)) => { return Err(e.to_string()).map_err(logthru_net!(error)); diff --git a/veilid-core/src/network_manager/wasm/protocol/ws.rs b/veilid-core/src/network_manager/wasm/protocol/ws.rs index 96f8b480..88d156f0 100644 --- a/veilid-core/src/network_manager/wasm/protocol/ws.rs +++ b/veilid-core/src/network_manager/wasm/protocol/ws.rs @@ -56,9 +56,8 @@ impl WebsocketNetworkConnection { pub async fn recv(&self) -> Result, String> { let out = match self.inner.ws_stream.clone().next().await { Some(WsMessage::Binary(v)) => v, - Some(_) => { - return Err("Unexpected WS message type".to_owned()) - .map_err(logthru_net!(error)); + Some(x) => { + return Err(format!("Unexpected WS message type: {:?}", x)); } None => { return Err("WS stream closed".to_owned()).map_err(logthru_net!(error));