fixed: race condition on service stop / restart

Do not close -l file descriptor while there are alive childrent
This commit is contained in:
z3APA3A 2018-04-21 17:25:01 +03:00
parent de21bd0f6a
commit 78e180a054

View File

@ -802,7 +802,6 @@ int MODULEMAINFUNC (int argc, char** argv){
}
if(!srv.silent) srv.logfunc(&defparam, (unsigned char *)"Exiting thread");
if(fp) fclose(fp);
srvfree(&srv);
@ -820,6 +819,7 @@ int MODULEMAINFUNC (int argc, char** argv){
if(defparam.hostname)myfree(defparam.hostname);
if(cbc_string)myfree(cbc_string);
if(cbl_string)myfree(cbl_string);
if(fp) fclose(fp);
return 0;
}