Client closes gracefully when host becomes unavailable