Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Fixes**:

- Envelopes will be discarded rather than blocking if the transport channel fills up (previously fixed in async-capable transports, now applied to the curl/ureq transports). ([#701](https://github.com/getsentry/sentry-rust/pull/701))

## 0.34.0

**Features**:
Expand Down
7 changes: 6 additions & 1 deletion sentry/src/transports/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ impl TransportThread {
}

pub fn send(&self, envelope: Envelope) {
let _ = self.sender.send(Task::SendEnvelope(envelope));
// Using send here would mean that when the channel fills up for whatever
// reason, trying to send an envelope would block everything. We'd rather
// drop the envelope in that case.
if let Err(e) = self.sender.try_send(Task::SendEnvelope(envelope)) {
sentry_debug!("envelope dropped: {e}");
}
}

pub fn flush(&self, timeout: Duration) -> bool {
Expand Down
Loading