Skip to content
Merged
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
12 changes: 7 additions & 5 deletions crates/goose/src/gateway/telegram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ impl TelegramGateway {
.ok_or_else(|| anyhow::anyhow!("missing bot_token in platform_config"))?
.to_string();

Ok(Self {
bot_token,
client: Client::new(),
})
let client = Client::builder()
.connect_timeout(std::time::Duration::from_secs(10))
.http1_only()
.build()?;

Ok(Self { bot_token, client })
}

fn api_url(&self, method: &str) -> String {
Expand Down Expand Up @@ -438,7 +440,7 @@ impl Gateway for TelegramGateway {
}
}
Err(e) => {
tracing::error!(error = %e, "Telegram poll error");
tracing::error!(error = ?e, "Telegram poll error");
tokio::time::sleep(RETRY_DELAY).await;
}
}
Expand Down
Loading