]> git.ipfire.org Git - zone-sync.git/commitdiff
main: Decrement the counter of running zones again
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 May 2026 16:40:44 +0000 (16:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 May 2026 16:40:44 +0000 (16:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
main.c

diff --git a/main.c b/main.c
index e4f1ff13aff05910eeb07245345964e75c689114..c4e98eac62d5ed593bb73b2ea2a878533f3faafd 100644 (file)
--- a/main.c
+++ b/main.c
@@ -226,10 +226,13 @@ static void maybe_shutdown(void) {
 
 static void zone_done(dns_zone_t* zone) {
        // Release the zone from the manager
-    dns_zonemgr_releasezone(ctx.zonemgr, zone);
+       dns_zonemgr_releasezone(ctx.zonemgr, zone);
 
        // Free the zone
-    dns_zone_detach(&zone);
+       dns_zone_detach(&zone);
+
+       // Decrement the number of running zones
+       ctx.running--;
 
        // Terminate if we are all done
        maybe_shutdown();