mirror of https://github.com/celery/kombu.git
enhance: allow uses to disable broker heartbeats by not providing a timeout
This commit is contained in:
parent
eae75855e0
commit
cddc500fd2
|
@ -195,9 +195,10 @@ class ConsumerMixin:
|
|||
try:
|
||||
conn.drain_events(timeout=safety_interval)
|
||||
except socket.timeout:
|
||||
if timeout:
|
||||
conn.heartbeat_check()
|
||||
elapsed += safety_interval
|
||||
if timeout and elapsed >= timeout:
|
||||
if elapsed >= timeout:
|
||||
raise
|
||||
except OSError:
|
||||
if not self.should_stop:
|
||||
|
|
Loading…
Reference in New Issue