Skip to content

Commit 192fb98

Browse files
committed
bumps telemetry finish timeout to 1 second and surface errors other than timeout
1 parent 81fb827 commit 192fb98

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/chat-cli/src/cli/chat/tools/custom_tool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ impl CustomToolClient {
107107
}
108108

109109
pub fn assign_messenger(&mut self, messenger: Box<dyn Messenger>) {
110-
tracing::error!("## background: assigned {} with messenger", self.get_server_name());
111110
match self {
112111
CustomToolClient::Stdio { client, .. } => {
113112
client.messenger = Some(messenger);

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ impl TelemetryThread {
162162
pub async fn finish(self) -> Result<(), TelemetryError> {
163163
drop(self.tx);
164164
if let Some(handle) = self.handle {
165-
let _ = tokio::time::timeout(std::time::Duration::from_millis(100), handle).await;
165+
if let Err(e) = tokio::time::timeout(std::time::Duration::from_millis(1000), handle).await {
166+
return Err(TelemetryError::Timeout(e));
167+
}
166168
}
167169

168170
Ok(())

0 commit comments

Comments
 (0)