From 4f04241bb32b954c69b4de2d1c49f53699c28044 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Thu, 15 Aug 2019 11:32:41 +0200 Subject: [PATCH] Avoid community whitelist purging Fixes #175 --- sn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sn.c b/sn.c index f817321..b39ca11 100644 --- a/sn.c +++ b/sn.c @@ -1125,7 +1125,7 @@ static int run_loop(n2n_sn_t * sss) { HASH_ITER(hh, sss->communities, comm, tmp) { purge_expired_registrations( &comm->edges, &last_purge_edges ); - if(comm->edges == NULL) { + if((comm->edges == NULL) && (!sss->lock_communities)) { traceEvent(TRACE_INFO, "Purging idle community %s", comm->community); HASH_DEL(sss->communities, comm); free(comm);