mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-04 08:15:08 +00:00
Make restart async
This commit is contained in:
@@ -207,9 +207,9 @@ class Session:
|
||||
|
||||
log.debug("Session stopped")
|
||||
|
||||
def restart(self):
|
||||
self.stop()
|
||||
self.start()
|
||||
async def restart(self):
|
||||
await self.stop()
|
||||
await self.start()
|
||||
|
||||
def pack(self, message: Message):
|
||||
data = Long(self.current_salt.salt) + self.session_id + message.write()
|
||||
|
Reference in New Issue
Block a user