We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2cf6b2f + 9780bf7 commit a4b3288Copy full SHA for a4b3288
1 file changed
tornado_mysql/connections.py
@@ -624,6 +624,9 @@ def close(self):
624
@gen.coroutine
625
def close_async(self):
626
"""Send the quit message and close the socket"""
627
+ if self._stream is None or self._stream.closed():
628
+ self._stream = None
629
+ return
630
send_data = struct.pack('<i', 1) + int2byte(COMMAND.COM_QUIT)
631
yield self._stream.write(send_data)
632
self.close()
0 commit comments