You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Transport::flush on an Arc<T> transport returns true without flushing T #1374
and this src/main.rs, whose transport's flush always reports envelopes left behind:
use std::sync::Arc;use std::time::Duration;use sentry_core::{Envelope,Transport};/// A transport whose queue never drains, so every flush reports envelopes left behind.structNeverDrains;implTransportforNeverDrains{fnsend_envelope(&self,envelope:Envelope){let _ = envelope;}fnflush(&self,_timeout:Duration) -> bool{false}}fnmain(){let direct = Transport::flush(&NeverDrains,Duration::ZERO);let through_arc = Transport::flush(&Arc::new(NeverDrains),Duration::ZERO);let shutdown_through_arc = Transport::shutdown(&Arc::new(NeverDrains),Duration::ZERO);println!("flush on the transport: {direct}");println!("flush on Arc<transport>: {through_arc}");println!("shutdown on Arc<transport>: {shutdown_through_arc}");}
cargo run
Expected result
flush on Arc<transport>: false, what flush on the transport itself returns.
Actual result
flush on the transport: false
flush on Arc<transport>: true
shutdown on Arc<transport>: false
rustc 1.99.1 on Windows 11 x64. A caller told by flush through the Arc that the queue drained can end the process with envelopes still queued in T.
Activity
linear-code commentedon Oct 28, 2026
RUST-302
szokeasaurusrex commentedon Oct 29, 2026
@YevheniiKotyrlo good catch, thanks for the report. We will fix this
fix(transport): Forward `flush` through `Arc<T>` transports (getsentr…