Skip to content

Commit

Permalink
don't brpop if closed
Browse files Browse the repository at this point in the history
  • Loading branch information
thuibr committed Oct 14, 2024
1 parent 47457c1 commit 7e0f8b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions kombu/transport/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,12 +1087,13 @@ 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:
if self._in_poll:
try:
self._brpop_read()
except Empty:
pass

# remove from channel poller.
self.connection.cycle.discard(self)

Expand Down

0 comments on commit 7e0f8b5

Please sign in to comment.