From f765e2236d74312b7ebce2479a18a67660555e53 Mon Sep 17 00:00:00 2001 From: NeonKirill Date: Mon, 25 Nov 2024 11:12:28 +0100 Subject: [PATCH] small fix --- neon_mq_connector/connector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_mq_connector/connector.py b/neon_mq_connector/connector.py index bdfe61b..22228ec 100644 --- a/neon_mq_connector/connector.py +++ b/neon_mq_connector/connector.py @@ -546,7 +546,7 @@ def stop_consumers(self, names: tuple = (), allow_restart: bool = True): names = list(self.consumers) for name in names: try: - if isinstance(self.consumers.get(name), SUPPORTED_THREADED_CONSUMERS): + if isinstance(self.consumers.get(name), SUPPORTED_THREADED_CONSUMERS) and self.consumers[name].is_alive(): self.consumers[name].join(timeout=self.__consumer_join_timeout__, allow_restart=allow_restart) self.consumer_properties[name]['is_alive'] = self.consumers[name].is_consumer_alive self.consumer_properties[name]['started'] = False