Skip to content

Commit ec39f6e

Browse files
kamil-certatsebix
andauthored
Apply suggestions from code review
Co-authored-by: Sebastian <sebix@sebix.at>
1 parent d10439d commit ec39f6e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
### Configuration
1313

1414
### Core
15-
- Fix maintaining pipeline connection when using AMQP (PR# by Kamil Mankowski).
15+
- AMQP: Fix maintaining pipeline connection when during interrupted connections (PR#2533 by Kamil Mankowski).
1616

1717
### Development
1818

intelmq/lib/pipeline.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,7 @@ def _send(self, destination_queue, message, reconnect=True):
608608
mandatory=True,
609609
)
610610
except Exception as exc: # UnroutableError, NackError in 1.0.0
611-
if reconnect and (
612-
isinstance(exc, pika.exceptions.ConnectionClosed) or
613-
isinstance(exc, pika.exceptions.StreamLostError)
614-
):
611+
if reconnect and isinstance(exc, (pika.exceptions.ConnectionClosed, pika.exceptions.StreamLostError)):
615612
self.logger.debug('Error sending the message. '
616613
'Will re-connect and re-send.',
617614
exc_info=True)

0 commit comments

Comments
 (0)