From 386c3991cd8463727b4742e356da1b193b6fbfdb Mon Sep 17 00:00:00 2001 From: stefanodvx <69367859+stefanodvx@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:14:31 +0200 Subject: [PATCH] bot: decrease polling timeout --- bot/core/util.go | 3 --- bot/main.go | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bot/core/util.go b/bot/core/util.go index 1a66d2b..f2b6790 100644 --- a/bot/core/util.go +++ b/bot/core/util.go @@ -3,7 +3,6 @@ package core import ( "context" "fmt" - "log" "path/filepath" "strings" @@ -230,8 +229,6 @@ func SendErrorMessage( ctx *ext.Context, errorMessage string, ) { - log.Println(errorMessage) - switch { case ctx.Update.Message != nil: ctx.EffectiveMessage.Reply( diff --git a/bot/main.go b/bot/main.go index 6ae9a35..1acb163 100644 --- a/bot/main.go +++ b/bot/main.go @@ -45,9 +45,9 @@ func Start() { err = updater.StartPolling(b, &ext.PollingOpts{ DropPendingUpdates: true, GetUpdatesOpts: &gotgbot.GetUpdatesOpts{ - Timeout: 9 * 60, + Timeout: 9, RequestOpts: &gotgbot.RequestOpts{ - Timeout: time.Minute * 10, + Timeout: time.Second * 10, }, AllowedUpdates: AllowedUpdates, },