-
-
Notifications
You must be signed in to change notification settings - Fork 69k
Discord plugin fails to auto-reconnect after WebSocket connection error #30514
Copy link
Copy link
Closed
Description
Description
When the Discord bot WebSocket connection drops (shows "connection error" in Discord), the plugin does not automatically reconnect. All subsequent messages from Discord channels are not received until manual Gateway restart.
Steps to Reproduce
- OpenClaw running with Discord plugin enabled
- Discord WebSocket connection drops (network issue, Discord API hiccup, etc.)
- Discord shows "connection error"
- User sends messages in configured Discord channels
- Bot does not respond to any messages
Expected Behavior
Discord plugin should automatically detect connection loss and attempt to reconnect (with exponential backoff).
Actual Behavior
- Connection loss is not detected
- No reconnection attempts
- Bot remains in "zombie" state (appears online but receives no messages)
- Manual Gateway restart (
openclaw restart) is required to restore functionality
Environment
- OpenClaw version: 2026.2.25
- Node version: v22.22.0
- OS: macOS 15.1 (Darwin 25.1.0, arm64)
- Discord config:
streaming: off,groupPolicy: allowlist
Workaround
Run openclaw restart when connection error is noticed.
Alternatively, set up a periodic health check script that:
- Tests Discord connection every 15 minutes
- Automatically restarts Gateway if connection fails
- Sends notification to user
Logs
No error logs are produced when connection drops. openclaw status shows Discord │ ON │ OK even when not receiving messages.
Suggested Fix
Implement WebSocket heartbeat monitoring and automatic reconnection logic in the Discord plugin, similar to how Telegram handles connection drops.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.