Catch BrokenPipeError in addition to ConnectionResetError when publishing a message to the AMQP queue

master
Simon Quigley 4 weeks ago
parent b21879fcff
commit b92249f2a0

@ -1177,7 +1177,7 @@ class AutopkgtestPolicy(BasePolicy):
self.amqp_channel.basic_publish(amqp.Message(src + '\n' + params,
delivery_mode=2), # persistent
routing_key=qname)
except ConnectionResetError:
except (ConnectionResetError, BrokenPipeError):
return False
else:
# for file-based submission, triggers are space separated

Loading…
Cancel
Save