fixed bug where exiting while in the rejoin code enter screen would poison the mutex
This commit is contained in:
parent
7ec28b778d
commit
8d9da595f1
1 changed files with 5 additions and 1 deletions
|
@ -127,7 +127,11 @@ fn handle_client(mut stream: TcpStream, channel: Channel, password: Option<Vec<u
|
|||
i = 0;
|
||||
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.status == UserStatus::Disconnected {
|
||||
stream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue