Right now, if gateway device goes offline and stays offline, the reconnect thread repeatedly tries to reconnect, and repeatedly gets exceptions, and any notifications the user/administrator gets about what's going on are the ones about the exceptions (so either not at all, or way too many).
In practice the reconnect loop hits the 2 minute backoff limit and may send mail every 2 minutes.
A better idea would be to decouple "gateway offline" notifications from the exception reporting notifications, and send just edge-triggered "gateway went offline" and "gateway came back online" notifications.
Right now, if gateway device goes offline and stays offline, the reconnect thread repeatedly tries to reconnect, and repeatedly gets exceptions, and any notifications the user/administrator gets about what's going on are the ones about the exceptions (so either not at all, or way too many).
In practice the reconnect loop hits the 2 minute backoff limit and may send mail every 2 minutes.
A better idea would be to decouple "gateway offline" notifications from the exception reporting notifications, and send just edge-triggered "gateway went offline" and "gateway came back online" notifications.