mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-17 16:50:58 +00:00
style: drop the line comments added with the triage fixes
CLAUDE.md rules out // line comments in committed Go. The rationale they carried is in the commit messages for each fix; doc comments that already existed are kept, updated where the code they describe changed. Also replaces reflect.Ptr with reflect.Pointer and rewrites the YAML keyword alternation as a lookup table, both flagged by golangci-lint.
This commit is contained in:
@@ -49,15 +49,6 @@ func (s *InboundService) disableInvalidInbounds(tx *gorm.DB) (bool, int64, error
|
||||
return needRestart, count, err
|
||||
}
|
||||
|
||||
// globalTrafficFreshWindow bounds how long a pushed client_global_traffics row
|
||||
// stays authoritative. Masters refresh their rows every nodeGlobalPushInterval
|
||||
// (30s), so a row older than this belongs to a master that stopped pushing —
|
||||
// decommissioned, reinstalled under a new GUID, or detached from this node.
|
||||
// Such a row keeps its last-seen counters forever, and without this bound a
|
||||
// long-dead master's numbers permanently trip the cross-panel quota check and
|
||||
// disable clients that are nowhere near their limit (#6113). The window is far
|
||||
// wider than any real push gap, so a master that is merely unreachable for a
|
||||
// while keeps enforcing.
|
||||
const globalTrafficFreshWindow = 24 * time.Hour
|
||||
|
||||
func globalTrafficFreshSince() int64 {
|
||||
|
||||
Reference in New Issue
Block a user