diff --git a/crates/re_sdk_comms/src/buffered_client.rs b/crates/re_sdk_comms/src/buffered_client.rs index 2828d7585e8b..ed6a389fde1a 100644 --- a/crates/re_sdk_comms/src/buffered_client.rs +++ b/crates/re_sdk_comms/src/buffered_client.rs @@ -196,11 +196,23 @@ fn msg_encode( MsgMsg::Flush => PacketMsg::Flush, }; - packet_tx - .send(packet_msg) - .expect("tcp_sender thread should live longer"); + // TODO(jleibs): It's not clear why we're hitting this case, but an error here is still better than + // a panic. See: https://github.com/rerun-io/rerun/issues/1855 + match packet_tx.send(packet_msg) { + Ok(_) => {}, + Err(_) => { + re_log::error!("Failed to send message to tcp_sender thread. Likely a shutdown race-condition."); + }, + }; - msg_drop_tx.send(msg_msg).expect("Main thread should still be alive"); + // TODO(jleibs): It's not clear why we're hitting this case, but an error here is still better than + // a panic. See: https://github.com/rerun-io/rerun/issues/1855 + match msg_drop_tx.send(msg_msg) { + Ok(_) => {}, + Err(_) => { + re_log::error!("Failed to send message to msg_dropp thread. Likely a shutdown race-condition"); + }, + }; } else { return; // channel has closed }