diff --git a/web/job/check_clinet_ip_job.go b/web/job/check_clinet_ip_job.go index 2e922a19..7e1cc4f7 100644 --- a/web/job/check_clinet_ip_job.go +++ b/web/job/check_clinet_ip_job.go @@ -18,10 +18,11 @@ type CheckClientIpJob struct { xrayService service.XrayService inboundService service.InboundService } - +var job *CheckClientIpJob func NewCheckClientIpJob() *CheckClientIpJob { - return new(CheckClientIpJob) + job = new(CheckClientIpJob) + return job } func (j *CheckClientIpJob) Run() { @@ -228,5 +229,9 @@ func DisableInbound(id int) error{ err := result.Error logger.Warning("disable inbound with id:",id) + if err == nil { + job.xrayService.SetToNeedRestart() + } + return err }