Skip to content

Commit 0622a55

Browse files
committed
Explain handling connection
1 parent ec39f6e commit 0622a55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

intelmq/lib/pipeline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,9 @@ def _receive(self) -> bytes:
646646
if self.source_queue is None:
647647
raise exceptions.ConfigurationError('pipeline', 'No source queue given.')
648648
try:
649+
# self.channel.consume is blocking and with no incoming messages
650+
# can prevent heartbeat maintenance. This loop let the pika maintain
651+
# the channel at least once between expected heartbeats.
649652
method, body = None, None
650653
while not (method or body):
651654
method, _, body = next(

0 commit comments

Comments
 (0)