Retry on connection failure and response timeout