diff options
author | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2022-10-25 18:19:14 +0200 |
---|---|---|
committer | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2022-10-25 18:19:14 +0200 |
commit | af35130231265b5d54a64434e05779cb1936816c (patch) | |
tree | 75c414a9745f4280ebec2a1d51463b50dbf62ded /examples/chat_server/main.rs | |
parent | fabb2d000bd870bd8cf02bafe7d773f2ac750462 (diff) |
[server] Rename DisconnectionEvent to ConnectionLostEvent for clarity
Diffstat (limited to 'examples/chat_server/main.rs')
-rw-r--r-- | examples/chat_server/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/chat_server/main.rs b/examples/chat_server/main.rs index dee89ab..58bf17c 100644 --- a/examples/chat_server/main.rs +++ b/examples/chat_server/main.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use bevy::{app::ScheduleRunnerPlugin, log::LogPlugin, prelude::*}; use bevy_quinnet::{ - server::{DisconnectionEvent, QuinnetServerPlugin, Server, ServerConfigurationData}, + server::{ConnectionLostEvent, QuinnetServerPlugin, Server, ServerConfigurationData}, ClientId, }; @@ -78,12 +78,12 @@ fn handle_client_messages(mut server: ResMut<Server>, mut users: ResMut<Users>) } fn handle_server_events( - mut disconnections: EventReader<DisconnectionEvent>, + mut connection_lost_events: EventReader<ConnectionLostEvent>, mut server: ResMut<Server>, mut users: ResMut<Users>, ) { - // The server signals us about users that disconnected (connection lost) - for client in disconnections.iter() { + // The server signals us about users that lost connection + for client in connection_lost_events.iter() { handle_disconnect(&mut server, &mut users, client.id); } } |