Skip to content

Commit b7b80ba

Browse files
committed
only surface error for telemetry finish if it's not a timeout
1 parent 192fb98 commit b7b80ba

File tree

1 file changed

+9
-2
lines changed
  • crates/chat-cli/src/telemetry

1 file changed

+9
-2
lines changed

crates/chat-cli/src/telemetry/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,15 @@ impl TelemetryThread {
162162
pub async fn finish(self) -> Result<(), TelemetryError> {
163163
drop(self.tx);
164164
if let Some(handle) = self.handle {
165-
if let Err(e) = tokio::time::timeout(std::time::Duration::from_millis(1000), handle).await {
166-
return Err(TelemetryError::Timeout(e));
165+
match tokio::time::timeout(std::time::Duration::from_millis(1000), handle).await {
166+
Ok(result) => {
167+
if let Err(e) = result {
168+
return Err(TelemetryError::Join(e));
169+
}
170+
},
171+
Err(_) => {
172+
// Ignore timeout errors
173+
},
167174
}
168175
}
169176

0 commit comments

Comments
 (0)