Skip to content

Commit 5962139

Browse files
authoredOct 29, 2024··
Merge pull request #1281 from MetPX/issue1278
close #1278 we learned that acks should never be retried
2 parents 95f77aa + 179f8a2 commit 5962139

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed
 

‎sarracenia/moth/amqp.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,11 @@ def ack(self, m: sarracenia.Message) -> None:
603603
except Exception as err:
604604
logger.warning("failed for tag: %s: %s" % (m['ack_id'], err))
605605
logger.debug('Exception details: ', exc_info=True)
606-
if type(err) == BrokenPipeError or type(err) == ConnectionResetError:
607-
# Cleanly close partially broken connection
608-
self.close()
609-
# No point in trying to ack again if the connection is broken
610-
del m['ack_id']
611-
m['_deleteOnPost'].remove('ack_id')
612-
return False
606+
# No point in trying to ack again if the connection is broken
607+
del m['ack_id']
608+
m['_deleteOnPost'].remove('ack_id')
609+
self.close()
610+
return False
613611

614612
if ebo < 60:
615613
ebo *= 2

0 commit comments

Comments
 (0)
Please sign in to comment.