Skip to content

Commit

Permalink
Merge pull request #1281 from MetPX/issue1278
Browse files Browse the repository at this point in the history
close #1278 we learned that acks should never be retried
  • Loading branch information
petersilva authored Oct 29, 2024
2 parents 95f77aa + 179f8a2 commit 5962139
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sarracenia/moth/amqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,13 +603,11 @@ def ack(self, m: sarracenia.Message) -> None:
except Exception as err:
logger.warning("failed for tag: %s: %s" % (m['ack_id'], err))
logger.debug('Exception details: ', exc_info=True)
if type(err) == BrokenPipeError or type(err) == ConnectionResetError:
# Cleanly close partially broken connection
self.close()
# No point in trying to ack again if the connection is broken
del m['ack_id']
m['_deleteOnPost'].remove('ack_id')
return False
# No point in trying to ack again if the connection is broken
del m['ack_id']
m['_deleteOnPost'].remove('ack_id')
self.close()
return False

if ebo < 60:
ebo *= 2
Expand Down

0 comments on commit 5962139

Please sign in to comment.