diff --git a/telegrambot.py b/telegrambot.py index 92eb6f42..d501e987 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -509,7 +509,10 @@ def on_callback_query(bot: telegram.Bot, update: telegram.Update): }) sentry.captureException() finally: - session.close() + try: + session.close() + except Exception: + pass @command