Tweak hooks.quit
This commit is contained in:
parent
87df9e1440
commit
81c96f4a56
@ -593,9 +593,9 @@ def quit(context, message=""):
|
|||||||
|
|
||||||
cli = context.client
|
cli = context.client
|
||||||
|
|
||||||
if cli is None:
|
if cli is None or cli.socket.fileno() < 0:
|
||||||
plog("Tried to QUIT but everything was being torn down.")
|
plog("Socket is already closed. Exiting.")
|
||||||
return
|
raise SystemExit
|
||||||
|
|
||||||
with cli:
|
with cli:
|
||||||
cli.send("QUIT :{0}".format(message))
|
cli.send("QUIT :{0}".format(message))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user