fix: have to use match to detect ReceiveMessageErrorType

This commit is contained in:
2026-04-16 02:03:52 -04:00
parent 6cd7f00028
commit e4e274a543

View File

@@ -344,7 +344,8 @@ async fn handle_events(command_router: Arc<CommandRouter>, state: State, mut sha
Ok(event) => { Ok(event) => {
handle_event(command_router.clone(), state.clone(), event).await; handle_event(command_router.clone(), state.clone(), event).await;
} }
Err(reconnect_error) if reconnect_error.kind() == twilight_gateway::error::ReceiveMessageErrorType::Reconnect => { Err(reconnect_error) if matches!(reconnect_error.kind(), &twilight_gateway::error::ReceiveMessageErrorType::Reconnect) => {
tracing::error!(?reconnect_error);
return; return;
} }
Err(error) => { Err(error) => {