Improving behavior on connection failure