Add reconnect logic based on failure count/last time