We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 95f77aa + 179f8a2 commit 5962139Copy full SHA for 5962139
sarracenia/moth/amqp.py
@@ -603,13 +603,11 @@ def ack(self, m: sarracenia.Message) -> None:
603
except Exception as err:
604
logger.warning("failed for tag: %s: %s" % (m['ack_id'], err))
605
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
+ # 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
613
614
if ebo < 60:
615
ebo *= 2
0 commit comments