- Add _reason_info helper method to extract reason names safely
- Update connect/disconnect callbacks to use string comparison instead of numeric
- Fix type annotations with proper Optional[Client] typing
- Resolve unreachable code warnings with type ignore comments for threading
- Improve error handling with robust try/finally blocks in stop method
- Maintain fresh client creation approach for reliable reconnection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace client.reconnect() with fresh client creation for each retry attempt
- Add proper cleanup of old client before creating new one
- Enhanced logging with detailed debugging info for disconnect reasons
- Use proven aiomqtt-style retry pattern for better reliability
- Each reconnection attempt now creates completely new MQTT client instance
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>