Try to be more intelligent about connection failures.