diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index 674e6045..eb9d9a51 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -1403,3 +1403,13 @@ class TelegramClient(TelegramBareClient): ) # endregion + + def join (self): + """ + Join all the threads spwaned for read; + if there is no thread, join will return + """ + + # If there is no thread to join, just return + if self._recv_thread is None: return + else: self._recv_thread.join()