bot: decrease polling timeout
This commit is contained in:
parent
2e9694689f
commit
386c3991cd
2 changed files with 2 additions and 5 deletions
|
@ -3,7 +3,6 @@ package core
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -230,8 +229,6 @@ func SendErrorMessage(
|
||||||
ctx *ext.Context,
|
ctx *ext.Context,
|
||||||
errorMessage string,
|
errorMessage string,
|
||||||
) {
|
) {
|
||||||
log.Println(errorMessage)
|
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case ctx.Update.Message != nil:
|
case ctx.Update.Message != nil:
|
||||||
ctx.EffectiveMessage.Reply(
|
ctx.EffectiveMessage.Reply(
|
||||||
|
|
|
@ -45,9 +45,9 @@ func Start() {
|
||||||
err = updater.StartPolling(b, &ext.PollingOpts{
|
err = updater.StartPolling(b, &ext.PollingOpts{
|
||||||
DropPendingUpdates: true,
|
DropPendingUpdates: true,
|
||||||
GetUpdatesOpts: &gotgbot.GetUpdatesOpts{
|
GetUpdatesOpts: &gotgbot.GetUpdatesOpts{
|
||||||
Timeout: 9 * 60,
|
Timeout: 9,
|
||||||
RequestOpts: &gotgbot.RequestOpts{
|
RequestOpts: &gotgbot.RequestOpts{
|
||||||
Timeout: time.Minute * 10,
|
Timeout: time.Second * 10,
|
||||||
},
|
},
|
||||||
AllowedUpdates: AllowedUpdates,
|
AllowedUpdates: AllowedUpdates,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue