The previous code would clear the proper interrupt flag assuming interrupt1 was INT0 and interrupt2 was INT1. If interrupt1 was INT1 or interrupt2 was INT0, the sleep bug would be triggered.
Optionally allow MQTT client to publish specific messages with the retain flag set. default/current behavior should not be impacted.