Skip to content

Skill update & prevent duplicate listeners#484

Merged
khaliqgant merged 6 commits intomainfrom
skill-update
Mar 4, 2026
Merged

Skill update & prevent duplicate listeners#484
khaliqgant merged 6 commits intomainfrom
skill-update

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 4, 2026

Summary

Test Plan

  • Tests added/updated
  • Manual testing completed

Screenshots


Open with Devin

@khaliqgant khaliqgant requested a review from willwashburn as a code owner March 4, 2026 23:02
devin-ai-integration[bot]

This comment was marked as resolved.

@khaliqgant khaliqgant merged commit d84fd11 into main Mar 4, 2026
21 checks passed
@khaliqgant khaliqgant deleted the skill-update branch March 4, 2026 23:28
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 8 additional findings in Devin Review.

Open in Devin Review

Comment on lines +151 to +153
// Explicit connect() clears pairing rejection so users can retry after fixing their token
this.pairingRejected = false;
this.stopped = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 connect() does not reset consecutiveFailures, preventing recovery after max reconnect failures

The connect() method (line 148-153) explicitly resets pairingRejected and stopped so that callers can retry after fixing their configuration, but it does not reset consecutiveFailures. After 5 consecutive reconnect failures, scheduleReconnect() at packages/openclaw/src/gateway.ts:422-425 permanently stops retrying. When sendChatMessage() later calls connect() to retry (packages/openclaw/src/gateway.ts:380), doConnect() runs once, but if that attempt also fails, the close handler's call to scheduleReconnect() exits immediately because consecutiveFailures is still >= 5. The connection then hangs until the 30s timeout and the client is effectively broken until the process restarts, even if the underlying issue (e.g., gateway not yet started) has been resolved.

Suggested change
// Explicit connect() clears pairing rejection so users can retry after fixing their token
this.pairingRejected = false;
this.stopped = false;
// Explicit connect() clears pairing rejection so users can retry after fixing their token
this.pairingRejected = false;
this.stopped = false;
this.consecutiveFailures = 0;
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant