Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web/job
diff options
context:
space:
mode:
Diffstat (limited to 'web/job')
-rw-r--r--web/job/check_inbound_job.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/web/job/check_inbound_job.go b/web/job/check_inbound_job.go
index 2b24afb0..cb8bd331 100644
--- a/web/job/check_inbound_job.go
+++ b/web/job/check_inbound_job.go
@@ -15,19 +15,21 @@ func NewCheckInboundJob() *CheckInboundJob {
}
func (j *CheckInboundJob) Run() {
- count, err := j.inboundService.DisableInvalidClients()
+ needRestart, count, err := j.inboundService.DisableInvalidClients()
if err != nil {
- logger.Warning("disable invalid Client err:", err)
+ logger.Warning("Error in disabling invalid clients:", err)
} else if count > 0 {
- logger.Debugf("disabled %v Client", count)
- j.xrayService.SetToNeedRestart()
+ logger.Debugf("%v clients disabled", count)
+ if needRestart {
+ j.xrayService.SetToNeedRestart()
+ }
}
count, err = j.inboundService.DisableInvalidInbounds()
if err != nil {
- logger.Warning("disable invalid inbounds err:", err)
+ logger.Warning("Error in disabling invalid inbounds:", err)
} else if count > 0 {
- logger.Debugf("disabled %v inbounds", count)
+ logger.Debugf("%v inbounds disabled", count)
j.xrayService.SetToNeedRestart()
}
}