diff --git a/common/client-libs/gateway-client/src/client/mod.rs b/common/client-libs/gateway-client/src/client/mod.rs index 612349315f..de90b3ad35 100644 --- a/common/client-libs/gateway-client/src/client/mod.rs +++ b/common/client-libs/gateway-client/src/client/mod.rs @@ -201,7 +201,7 @@ impl GatewayClient { #[cfg(not(target_arch = "wasm32"))] pub async fn establish_connection(&mut self) -> Result<(), GatewayClientError> { debug!( - "Attemting to establish connection to gateway at: {}", + "Attempting to establish connection to gateway at: {}", self.gateway_address ); let (ws_stream, _) = connect_async( diff --git a/common/client-libs/gateway-client/src/socket_state.rs b/common/client-libs/gateway-client/src/socket_state.rs index b2a1e6ebb0..5489ec3628 100644 --- a/common/client-libs/gateway-client/src/socket_state.rs +++ b/common/client-libs/gateway-client/src/socket_state.rs @@ -337,7 +337,7 @@ impl PartiallyDelegatedHandle { // check if the split stream didn't error out let receive_res = stream_receiver .try_recv() - .expect("stream sender was somehow dropped without sending anything!"); + .map_err(|_| GatewayClientError::ConnectionAbruptlyClosed)?; if let Some(res) = receive_res { let _res = res?;