File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## Unreleased
4
+
5
+ ** Fixes** :
6
+
7
+ - Envelopes will be discarded rather than blocking if the transport channel fills up. ([ #546 ] ( https://github.com/getsentry/sentry-rust/pull/546 ) )
8
+
3
9
## 0.29.2
4
10
5
11
### Various fixes & improvements
Original file line number Diff line number Diff line change @@ -85,7 +85,12 @@ impl TransportThread {
85
85
}
86
86
87
87
pub fn send ( & self , envelope : Envelope ) {
88
- let _ = self . sender . send ( Task :: SendEnvelope ( envelope) ) ;
88
+ // Using send here would mean that when the channel fills up for whatever
89
+ // reason, trying to send an envelope would block everything. We'd rather
90
+ // drop the envelope in that case.
91
+ if let Err ( e) = self . sender . try_send ( Task :: SendEnvelope ( envelope) ) {
92
+ sentry_debug ! ( "envelope dropped: {e}" ) ;
93
+ }
89
94
}
90
95
91
96
pub fn flush ( & self , timeout : Duration ) -> bool {
You can’t perform that action at this time.
0 commit comments