mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-02 00:17:13 +00:00
fix(clients): surface bulk-reset auto-enable failures (#5763)
* fix(clients): surface bulk-reset auto-enable failures BulkResetTraffic re-enables a disabled client before resetting its traffic, but discarded the s.Update result with `_, _ =`, so a failed re-enable was silent: the client stayed disabled with nothing logged, unlike the single-client ResetTraffic path which already warns on the same call. Check the error and log a warning to match, and add a regression test covering BulkResetTraffic's previously-untested re-enable path. * ci: update Go toolchain for govulncheck --------- Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
@@ -84,7 +84,9 @@ func (s *ClientService) BulkResetTraffic(inboundSvc *InboundService, emails []st
|
||||
if err == nil && !rec.Enable {
|
||||
updated := rec.ToClient()
|
||||
updated.Enable = true
|
||||
_, _ = s.Update(inboundSvc, rec.Id, *updated)
|
||||
if _, uErr := s.Update(inboundSvc, rec.Id, *updated); uErr != nil {
|
||||
logger.Warning("Failed to auto-enable client during bulk traffic reset:", uErr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user