]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow-manager: reduce locks at startup
authorVictor Julien <vjulien@oisf.net>
Mon, 19 Sep 2022 18:05:31 +0000 (20:05 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 20 Sep 2022 09:24:10 +0000 (11:24 +0200)
Effectively busy looping on a mutex to wait for time to be ready.

src/flow-manager.c

index 03d201f7f98b3890742713d064129208b3fd370f..23ab9e801a412242259d0c028f462c8ebff03c90 100644 (file)
@@ -787,6 +787,7 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
     while (!TimeModeIsReady()) {
         if (suricata_ctl_flags != 0)
             return TM_ECODE_OK;
+        usleep(10);
     }
 
     uint32_t mp = MemcapsGetPressure() * 100;