diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py index 48e01a831..c243f2fa4 100644 --- a/kombu/transport/redis.py +++ b/kombu/transport/redis.py @@ -1087,11 +1087,6 @@ def _purge(self, queue): def close(self): self._closing = True - if self._in_poll: - try: - self._brpop_read() - except Empty: - pass if not self.closed: # remove from channel poller. self.connection.cycle.discard(self) diff --git a/t/unit/transport/test_redis.py b/t/unit/transport/test_redis.py index 2f4d89517..6446f2166 100644 --- a/t/unit/transport/test_redis.py +++ b/t/unit/transport/test_redis.py @@ -1451,7 +1451,7 @@ def test_close_in_poll(self): c = Connection(transport=Transport).channel() conn1 = c.client.connection conn1._sock.data = [('BRPOP', ('test_Redis',))] - c._in_poll = True + c._in_poll = conn1 c.close() assert conn1.disconnected assert conn1._sock.data == []