1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-03-07 11:22:34 +00:00

fix of #1027 and small fix of changelog for #1026

This commit is contained in:
2026-03-03 17:55:40 +06:00
parent e6d6bbdaa0
commit d3c1859338
2 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.extensions.utils.updates.retrieving
import dev.inmo.kslog.common.e
import dev.inmo.micro_utils.coroutines.*
import dev.inmo.tgbotapi.bot.RequestsExecutor
import dev.inmo.tgbotapi.bot.TelegramBot
@@ -122,7 +123,7 @@ fun TelegramBot.longPollingFlow(
withContext(contextToWork) {
while (isActive) {
runCatchingLogging(logger = Log) {
runCatching {
execute(
getUpdatesRequestCreator(lastUpdateIdentifier ?.plus(1))
).let { originalUpdates ->
@@ -136,6 +137,8 @@ fun TelegramBot.longPollingFlow(
return@onFailure
}
Log.e(e) { "Error during getting and handling of updates happen" }
exceptionsHandler?.invoke(e)
// It seems some problems with internet connection. See https://github.com/InsanusMokrassar/ktgbotapi/issues/989