Retry connection if exception raised