diff options
Diffstat (limited to 'web/job')
| -rw-r--r-- | web/job/check_inbound_job.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/job/check_inbound_job.go b/web/job/check_inbound_job.go index cb8bd331..2044ce68 100644 --- a/web/job/check_inbound_job.go +++ b/web/job/check_inbound_job.go @@ -25,11 +25,13 @@ func (j *CheckInboundJob) Run() { } } - count, err = j.inboundService.DisableInvalidInbounds() + needRestart, count, err = j.inboundService.DisableInvalidInbounds() if err != nil { logger.Warning("Error in disabling invalid inbounds:", err) } else if count > 0 { logger.Debugf("%v inbounds disabled", count) - j.xrayService.SetToNeedRestart() + if needRestart { + j.xrayService.SetToNeedRestart() + } } } |
