From 6c73791cab6d430e1c061c8c515280c01d2fe95d Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 11 Mar 2024 11:46:54 +0330 Subject: [xray] add BurstObservatory + minor changes Co-Authored-By: Alireza Ahmadi --- web/controller/inbound.go | 8 ++++---- web/service/inbound.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'web') diff --git a/web/controller/inbound.go b/web/controller/inbound.go index 7ef3245f..511afd64 100644 --- a/web/controller/inbound.go +++ b/web/controller/inbound.go @@ -175,7 +175,7 @@ func (a *InboundController) addInboundClient(c *gin.Context) { return } jsonMsg(c, "Client(s) added", nil) - if err == nil && needRestart { + if needRestart { a.xrayService.SetToNeedRestart() } } @@ -196,7 +196,7 @@ func (a *InboundController) delInboundClient(c *gin.Context) { return } jsonMsg(c, "Client deleted", nil) - if err == nil && needRestart { + if needRestart { a.xrayService.SetToNeedRestart() } } @@ -219,7 +219,7 @@ func (a *InboundController) updateInboundClient(c *gin.Context) { return } jsonMsg(c, "Client updated", nil) - if err == nil && needRestart { + if needRestart { a.xrayService.SetToNeedRestart() } } @@ -240,7 +240,7 @@ func (a *InboundController) resetClientTraffic(c *gin.Context) { return } jsonMsg(c, "traffic reseted", nil) - if err == nil && needRestart { + if needRestart { a.xrayService.SetToNeedRestart() } } diff --git a/web/service/inbound.go b/web/service/inbound.go index e9b1e595..d71057b1 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -969,7 +969,7 @@ func (s *InboundService) disableInvalidInbounds(tx *gorm.DB) (bool, int64, error s.xrayApi.Init(p.GetAPIPort()) for _, tag := range tags { err1 := s.xrayApi.DelInbound(tag) - if err == nil { + if err1 == nil { logger.Debug("Inbound disabled by api:", tag) } else { logger.Debug("Error in disabling inbound by api:", err1) -- cgit v1.2.3