Bläddra i källkod

htable: do not fork clean timer if no auto-expire is defined

- match the same condition used in mod init to declare the extra process
- reported by GH #1237
Daniel-Constantin Mierla 8 år sedan
förälder
incheckning
dc15a8cd44
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/modules/htable/htable.c

+ 1 - 1
src/modules/htable/htable.c

@@ -232,7 +232,7 @@ static int child_init(int rank)
 	LM_DBG("rank is (%d)\n", rank);
 
 	if(rank==PROC_MAIN) {
-		if(ht_timer_procs>0) {
+		if(ht_has_autoexpire() && ht_timer_procs>0) {
 			for(i=0; i<ht_timer_procs; i++) {
 				if(fork_sync_timer(PROC_TIMER, "HTable Timer", 1 /*socks flag*/,
 						ht_timer, (void*)(long)i, ht_timer_interval)<0) {