fix(traffic): restore quota-disabled inbounds when their traffic is reset (#6962)

An inbound switched off by its own traffic cap came back on the periodic reset, but the admin per-inbound reset and Reset All Traffic only zeroed the counters. After that nothing could tell it from a hand-disabled inbound, so it stayed off with every client on it. Both admin resets now re-enable the inbounds their cap switched off, using the predicate the periodic job used, now in the service next to disableInvalidInbounds; expired and hand-disabled inbounds stay off.
This commit is contained in:
25f2002654
2026-11-02 20:20:25 +05:30
committed by GitHub
parent 1796352600
commit eae4725d99
9 changed files with 184 additions and 38 deletions
@@ -112,7 +112,7 @@ func TestPanelResetsZeroSidecarQuota(t *testing.T) {
// sidecar's quota counters must stay too or clients get their quota again free.
func TestInboundResetAllKeepsSidecarQuota(t *testing.T) {
_, logPath := startQuotaSidecar(t, 46204, model.Client{Enable: true})
if err := (&InboundService{}).ResetAllTraffics(); err != nil {
if _, err := (&InboundService{}).ResetAllTraffics(); err != nil {
t.Fatalf("ResetAllTraffics: %v", err)
}
if got := quotaResets(t, logPath); len(got) != 0 {