소스 검색

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 년 전
부모
커밋
dc15a8cd44
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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) {