From 7faf808ad71f6c4a8127c98ffabee4a306532e35 Mon Sep 17 00:00:00 2001 From: Lonami Date: Sun, 17 Jun 2018 19:14:39 +0200 Subject: [PATCH] Better better docs --- telethon/client/updates.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/telethon/client/updates.py b/telethon/client/updates.py index c7620bfd..1bd1bfc1 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -16,9 +16,14 @@ class UpdateMethods(UserMethods): def run_loop(self): """ - Runs the event loop until a disconnection occurs, either from - Telegram or by user action. If the loop is already running you - should ``await client.connection_dropped`` instead. + Runs the event loop until `disconnect` is called or if an error + while connecting/sending/receiving occurs in the background. In + the latter case, said error will ``raise`` so you have a chance + to ``except`` it on your own code. + + This method shouldn't be called from ``async def`` as the loop + will be running already. Use ``await client.connection_dropped`` + in this situation instead. """ self.loop.run_until_complete(self.connection_dropped)