mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55:40 +08:00
re-authenticate connection on configuration change
This commit is contained in:
parent
eeb2d78fb1
commit
938b1d1aab
@ -519,6 +519,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
|
||||
freeconf(&conf);
|
||||
res = readconfig(fp);
|
||||
conf.version++;
|
||||
|
||||
if(res) RETURN(res);
|
||||
if(!writable)fclose(fp);
|
||||
|
@ -1685,8 +1685,8 @@ int reload (void){
|
||||
|
||||
fp = confopen();
|
||||
if(fp){
|
||||
conf.version++;
|
||||
error = readconfig(fp);
|
||||
conf.version++;
|
||||
if(error) {
|
||||
freeconf(&conf);
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
void srvinit(struct srvparam * srv, struct clientparam *param){
|
||||
|
||||
memset(srv, 0, sizeof(struct srvparam));
|
||||
srv->version = conf.version;
|
||||
srv->version = conf.version + 1;
|
||||
srv->paused = conf.paused;
|
||||
srv->logfunc = conf.logfunc;
|
||||
if(srv->logformat)myfree(srv->logformat);
|
||||
|
@ -68,7 +68,7 @@ int sockmap(struct clientparam * param, int timeo){
|
||||
|
||||
while (!stop&&!conf.timetoexit){
|
||||
sasize = sizeof(struct sockaddr_in);
|
||||
if(param->version != conf.version){
|
||||
if(param->version < conf.version){
|
||||
if (res = (*param->srv->authfunc)(param)) {return(res);}
|
||||
param->paused = conf.paused;
|
||||
param->version = conf.version;
|
||||
|
Loading…
Reference in New Issue
Block a user