Skip to content

The need for stop_polling in async version #2386

Open
@EugeneNeuron

Description

@EugeneNeuron
  1. What version of pyTelegramBotAPI are you using?
    4.22.0
  2. What OS are you using?
    Gnu/Linux
  3. What version of python are you using?
    3.10.7

I see how to gracefully stop polling using TeleBot class (#2098), but how to properly stop bot/polling using AsyncTeleBot?
I tried AsyncTeleBot.close_session, but it gives an error.

ERROR Aiohttp ClientError: ClientOSError
ERROR Unhandled exception (full traceback for debug level): Request timeout. Request: method=get url=getUpdates params=<aiohttp.formdata.FormData object at 0x7fb62f4137c0> files=None request_timeout=300

I can catch it and handle myself, but maybe there's a better way?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions