fix(analyzer): remove bad attributes in shutdown handler (#1605)

Fixes #1278
This commit is contained in:
Jonas L 2022-02-15 15:40:01 +01:00 committed by GitHub
parent 29511cfd2d
commit 0106b4c6cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -125,9 +125,9 @@ class MessageListener:
# If you try to close a connection that's already closed, you're going to have a bad time.
# We're breaking EAFP because this can be called multiple times depending on exception
# handling flow here.
if not self._channel.is_closed and not self._channel.is_closing:
if not self._channel.is_closed:
self._channel.stop_consuming()
if not self._connection.is_closed and not self._connection.is_closing:
if not self._connection.is_closed:
self._connection.close()
def graceful_shutdown(self, signum, frame):