From d890e5346cc9e6946b6e42addf1aad980e8369a9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 28 Dec 2022 17:44:02 +0100 Subject: [PATCH] Clear stored_msg_ids on session stop --- pyrogram/session/session.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index 6a7fc505..3ce96a8f 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -149,6 +149,8 @@ class Session: async def stop(self): self.is_started.clear() + self.stored_msg_ids.clear() + self.ping_task_event.set() if self.ping_task is not None: