Tweak hooks.quit

This commit is contained in:
Vgr E. Barry 2017-01-12 12:43:41 -05:00
parent 87df9e1440
commit 81c96f4a56

View File

@ -593,9 +593,9 @@ def quit(context, message=""):
cli = context.client
if cli is None:
plog("Tried to QUIT but everything was being torn down.")
return
if cli is None or cli.socket.fileno() < 0:
plog("Socket is already closed. Exiting.")
raise SystemExit
with cli:
cli.send("QUIT :{0}".format(message))