diff --git a/tornado_mysql/connections.py b/tornado_mysql/connections.py index c266ed1..2a14f4e 100644 --- a/tornado_mysql/connections.py +++ b/tornado_mysql/connections.py @@ -624,6 +624,9 @@ def close(self): @gen.coroutine def close_async(self): """Send the quit message and close the socket""" + if self._stream is None or self._stream.closed(): + self._stream = None + return send_data = struct.pack('