Add automatic channel rejoin functionality

- Added auto_rejoin configuration to connection settings
- Handles KICK events and automatically schedules rejoin attempts
- Configurable retry interval and max attempts
- Tracks rejoin attempts per channel with exponential backoff
- Handles JOIN confirmations to stop rejoin loops
- Proper cleanup of rejoin tasks on shutdown
- Respects shutdown and connection state before rejoining
- Logs all rejoin attempts and results for debugging
This commit is contained in:
2025-10-05 19:34:49 +01:00
parent 0176284012
commit b5613f20dd
2 changed files with 128 additions and 1 deletions

View File

@@ -10,7 +10,12 @@
"password": "duckyhunt789",
"max_retries": 3,
"retry_delay": 5,
"timeout": 30
"timeout": 30,
"auto_rejoin": {
"enabled": true,
"retry_interval": 30,
"max_rejoin_attempts": 10
}
},
"sasl": {
"enabled": false,