Deal with connection failures more gracefully.