Skill update & prevent duplicate listeners#484
Conversation
| // Explicit connect() clears pairing rejection so users can retry after fixing their token | ||
| this.pairingRejected = false; | ||
| this.stopped = false; |
There was a problem hiding this comment.
🔴 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.
| // 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; |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Test Plan
Screenshots