diff --git a/orchagent/orchdaemon.cpp b/orchagent/orchdaemon.cpp index 26bd446da27..5b67d71fe88 100644 --- a/orchagent/orchdaemon.cpp +++ b/orchagent/orchdaemon.cpp @@ -294,12 +294,6 @@ void OrchDaemon::start() if (ret == Select::TIMEOUT) { - /* Let sairedis to flush all SAI function call to ASIC DB. - * Normally the redis pipeline will flush when enough request - * accumulated. Still it is possible that small amount of - * requests live in it. When the daemon has nothing to do, it - * is a good chance to flush the pipeline */ - flush(); continue; } @@ -313,5 +307,12 @@ void OrchDaemon::start() for (Orch *o : m_orchList) o->doTask(); + /* Let sairedis to flush all SAI function call to ASIC DB. + * Normally the redis pipeline will flush when enough request + * accumulated. Still it is possible that small amount of + * requests live in it. When the daemon has finished events/tasks, it + * is a good chance to flush the pipeline before next select happened. + */ + flush(); } }