mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 07:24:51 +00:00
Make Client.signal_handler reentrant (#57)
This commit is contained in:
parent
6e8077df2b
commit
40b768e97c
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue