move retries to the connection layer