mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Make Client.signal_handler reentrant (#57)
This commit is contained in:
parent
6e8077df2b
commit
40b768e97c
@ -810,7 +810,6 @@ class Client:
|
|||||||
log.debug("{} stopped".format(name))
|
log.debug("{} stopped".format(name))
|
||||||
|
|
||||||
def signal_handler(self, *args):
|
def signal_handler(self, *args):
|
||||||
self.stop()
|
|
||||||
self.is_idle = False
|
self.is_idle = False
|
||||||
|
|
||||||
def idle(self, stop_signals: tuple = (SIGINT, SIGTERM, SIGABRT)):
|
def idle(self, stop_signals: tuple = (SIGINT, SIGTERM, SIGABRT)):
|
||||||
@ -830,6 +829,8 @@ class Client:
|
|||||||
while self.is_idle:
|
while self.is_idle:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
self.stop()
|
||||||
|
|
||||||
def send(self, data: Object):
|
def send(self, data: Object):
|
||||||
"""Use this method to send Raw Function queries.
|
"""Use this method to send Raw Function queries.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user