mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 06:46:17 +00:00
last fix
This commit is contained in:
parent
f84897e4fb
commit
29d854eae7
1 changed files with 8 additions and 7 deletions
|
@ -85,6 +85,7 @@ func processLogFile() {
|
|||
|
||||
}
|
||||
disAllowedIps = []string{}
|
||||
shouldCleanLog := false
|
||||
|
||||
for clientEmail, ips := range InboundClientIps {
|
||||
inboundClientIps, err := GetInboundClientIps(clientEmail)
|
||||
|
@ -93,17 +94,17 @@ func processLogFile() {
|
|||
addInboundClientIps(clientEmail, ips)
|
||||
|
||||
} else {
|
||||
shouldCleanLog := updateInboundClientIps(inboundClientIps, clientEmail, ips)
|
||||
if shouldCleanLog {
|
||||
// clean log
|
||||
if err := os.Truncate(GetAccessLogPath(), 0); err != nil {
|
||||
checkError(err)
|
||||
}
|
||||
}
|
||||
shouldCleanLog = updateInboundClientIps(inboundClientIps, clientEmail, ips)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if shouldCleanLog {
|
||||
// clean log
|
||||
if err := os.Truncate(GetAccessLogPath(), 0); err != nil {
|
||||
checkError(err)
|
||||
}
|
||||
}
|
||||
time.Sleep(10 * time.Second)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue