Skip to content

Commit

Permalink
Add disconnect message
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas committed May 27, 2024
1 parent 390c5ec commit ab60b4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exercise-solutions/async-chat/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ async fn broker_loop(mut events: Receiver<Event>) {
disconnect = disconnect_receiver.recv() => {
let (name, _pending_messages) = disconnect.unwrap();
assert!(peers.remove(&name).is_some());
println!("user {} disconnected", name);
continue;
},
};
Expand Down

0 comments on commit ab60b4e

Please sign in to comment.