From 6abd0b7efdcd808167b95242d2f8cfdbd51f7e8e Mon Sep 17 00:00:00 2001 From: Simon Kirby Date: Thu, 9 May 2019 14:41:46 -0700 Subject: sync-mode: Also cancel flush timer in ALL_FLUSH_CACHE This makes the behaviour of "conntrackd -f" match that of "conntrackd -f internal" with resepect to stopping a timer ("conntrackd -t") from possibly flushing again in the future. Signed-off-by: Simon Kirby Signed-off-by: Pablo Neira Ayuso --- src/sync-mode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/sync-mode.c b/src/sync-mode.c index 082e2ce..29bedd6 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -708,6 +708,8 @@ static int local_handler_sync(int fd, int type, void *data) "commit still in progress"); break; } + /* inmediate flush, remove pending flush scheduled if any */ + del_alarm(&STATE_SYNC(reset_cache_alarm)); dlog(LOG_NOTICE, "flushing caches"); STATE(mode)->internal->ct.flush(); STATE_SYNC(external)->ct.flush(); -- cgit v1.2.3