Need to check for both _closing and _closed

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-11-06 12:12:46 +00:00
parent c78b214d0e
commit 38e72b2716
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -773,7 +773,7 @@ class MessageClient:
# TODO: timeout inflight sessions
def close(self):
if self._closing:
if self._closing or self._closed:
return
self._closing = True
self.io_loop.add_timeout(1, self.check_close)