mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-22 18:15:41 +08:00
Deadloc on traffcount fixed
This commit is contained in:
parent
00513a7d28
commit
5f341806b7
10
src/auth.c
10
src/auth.c
@ -683,7 +683,10 @@ int alwaysauth(struct clientparam * param){
|
||||
countout = 1;
|
||||
if(tc->ace->action != COUNTALL) continue;
|
||||
}
|
||||
if(tc->traflim64 <= tc->traf64) return 10;
|
||||
if(tc->traflim64 <= tc->traf64) {
|
||||
pthread_mutex_unlock(&tc_mutex);
|
||||
return 10;
|
||||
}
|
||||
param->trafcountfunc = conf.trafcountfunc;
|
||||
param->maxtrafin64 = tc->traflim64 - tc->traf64;
|
||||
}
|
||||
@ -695,7 +698,10 @@ int alwaysauth(struct clientparam * param){
|
||||
if(tc->ace->action != COUNTOUT && tc->ace->action != COUNTALL) {
|
||||
continue;
|
||||
}
|
||||
if(tc->traflim64 <= tc->traf64) return 10;
|
||||
if(tc->traflim64 <= tc->traf64) {
|
||||
pthread_mutex_unlock(&tc_mutex);
|
||||
return 10;
|
||||
}
|
||||
param->trafcountfunc = conf.trafcountfunc;
|
||||
param->maxtrafout64 = tc->traflim64 - tc->traf64;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user