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:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-07-18 02:10:22 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-07-18 02:10:22 +0300
commit1f78842b707a1190b6a84aded269d664254a7f1d (patch)
treef9226bfda4856a6289a657cff21234738be4f8c3 /web/job
parent81a057d63876df5ba69260ac6b97aeeb7964c87d (diff)
[feature] using xray API for inbound
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/job')
-rw-r--r--web/job/check_inbound_job.go6
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()
+ }
}
}