fixed bug where exiting while in the rejoin code enter screen would poison the mutex

This commit is contained in:
Arthur Beck 2025-04-14 21:14:00 -05:00
parent 7ec28b778d
commit 8d9da595f1
Signed by: ArthurB
GPG key ID: CA200B389F0F6BC9

View file

@ -127,7 +127,11 @@ fn handle_client(mut stream: TcpStream, channel: Channel, password: Option<Vec<u
i = 0; i = 0;
continue 'bufreadloop; continue 'bufreadloop;
} }
for user in &channel.lock().unwrap().online_users { let users;
{
users = channel.lock().unwrap().online_users.clone();
}
for user in users {
if user.name == new_name { if user.name == new_name {
if user.status == UserStatus::Disconnected { if user.status == UserStatus::Disconnected {
stream stream