fix: V2 interval type defense + alivelist client restoration#2
fix: V2 interval type defense + alivelist client restoration#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 758f6ffe70
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case float64: | ||
| if x <= 0 { | ||
| return def | ||
| } | ||
| return time.Duration(x) * time.Second |
There was a problem hiding this comment.
Clamp float intervals before converting to Duration
When push_interval/pull_interval comes back as a non-integer float (for example 0.5), this cast truncates to 0 and returns a zero interval instead of falling back to defaults. In this codebase, a zero interval feeds time.AfterFunc in the task scheduler, which can create a tight immediate-reschedule loop and high CPU usage rather than a safe polling cadence.
Useful? React with 👍 / 👎.
No description provided.