Browse Source

Delay service exit until new configuration is loaded

z3APA3A 9 years ago
parent
commit
05f39246bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/proxymain.c

+ 1 - 1
src/proxymain.c

@@ -685,7 +685,7 @@ int MODULEMAINFUNC (int argc, char** argv){
 	memset(&defparam.sincr, 0, sizeof(defparam.sincr));
 	memset(&defparam.sincr, 0, sizeof(defparam.sincr));
 	if(isudp) while(!srv.fds.events)usleep(SLEEPTIME);
 	if(isudp) while(!srv.fds.events)usleep(SLEEPTIME);
  }
  }
-
+ while(!conf.timetoexit && conf.version <= srv.version) usleep(SLEEPTIME);
  if(!srv.silent) srv.logfunc(&defparam, (unsigned char *)"Exiting thread");
  if(!srv.silent) srv.logfunc(&defparam, (unsigned char *)"Exiting thread");
  if(fp) fclose(fp);
  if(fp) fclose(fp);