From 4f0bade86e4e63f6824a8c65002666b418165ec0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Sun, 19 Jan 2020 16:35:39 +0100
Subject: [PATCH] an once set future to notify on dead will not be set multiple
 times

---
 coolamqp/attaches/consumer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coolamqp/attaches/consumer.py b/coolamqp/attaches/consumer.py
index d08bc49..9a921b3 100644
--- a/coolamqp/attaches/consumer.py
+++ b/coolamqp/attaches/consumer.py
@@ -310,7 +310,7 @@ class Consumer(Channeler):
         if self.future_to_notify_on_dead:  # notify it was cancelled
             logger.info('Consumer successfully cancelled')
             self.future_to_notify_on_dead.set_result(None)
-
+            self.future_to_notify_on_dead = None
         if should_retry:
             if old_con.state == ST_ONLINE:
                 logger.info('Retrying with %s', self.queue.name)
-- 
GitLab