Skip to content

Conversation

@Tiseno
Copy link

@Tiseno Tiseno commented Jan 7, 2026

/proc/uptime contains seconds since startup, not minutes

Copilot AI review requested due to automatic review settings January 7, 2026 19:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the discovery retry logic where the uptime limit was incorrectly set to 1 second instead of 1 minute. The issue stemmed from /proc/uptime returning seconds since startup, not minutes, leading to a mismatch between the intended behavior (retry for 1 minute) and the actual implementation (retry for 1 second).

  • Introduced a new constant DISCOVERY_RETRY_UPTIME_LIMIT set to 60 seconds for clarity
  • Fixed the uptime comparison logic to properly convert and compare durations
  • Updated comments and debug messages to accurately reflect the actual behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/main.rs Added constant for discovery retry uptime limit, fixed uptime comparison logic, and updated comments/debug messages to reflect correct behavior
CHANGELOG.md Added entry documenting the discovery retry uptime limit fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants