diff options
-rw-r--r-- | lib/ovs-thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c index 2d382f1e8..ac5d2c3d0 100644 --- a/lib/ovs-thread.c +++ b/lib/ovs-thread.c @@ -674,7 +674,7 @@ count_cpu_cores(void) static int cpu_cores; ovs_mutex_lock(&cpu_cores_mutex); - if (now - last_updated >= COUNT_CPU_UPDATE_TIME_MS) { + if (!last_updated || now - last_updated >= COUNT_CPU_UPDATE_TIME_MS) { last_updated = now; cpu_cores = count_cpu_cores__(); } |