Attempting to make connection resilient to disconnects.