The XML stream will re-schedule a reconnect on socket errors, except for DNS failures. If a user has no uplink connection, then DNS will also fail, preventing an automatic reconnection.
This patch consolidates the two code paths and sets a maximum back-off time of 5min (300s).