mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
banlimits for old connection may stop functioning on configuration reload
This commit is contained in:
1 parent
1996b11451
commit
2983575952
2 files changed
+10
-3
No files matched your search
+8
-2
@@ -485,8 +485,14 @@ unsigned bandlimitfunc(struct clientparam *param, unsigned nbytesin, unsigned nb
|
||||
|
||||
if(!nbytesin && !nbytesout) return 0;
|
||||
pthread_mutex_lock(&bandlim_mutex);
|
||||
if(param->paused != conf.paused){
|
||||
return (1);
|
||||
if(param->paused != conf.paused && param->bandlimver != conf.paused){
|
||||
if(!conf.bandlimfunc){
|
||||
param->bandlimfunc = NULL;
|
||||
pthread_mutex_unlock(&bandlim_mutex);
|
||||
return 0;
|
||||
}
|
||||
initbandlims(param);
|
||||
param->bandlimver = conf.paused;
|
||||
}
|
||||
for(i=0; nbytesin&& i<MAXBANDLIMS && param->bandlims[i]; i++){
|
||||
if( !param->bandlims[i]->basetime ||
|
||||
|
||||
Reference in new issue
Block a user