fixed crash condition
parent
5f42d33040
commit
b8f65ecf9d
12
src/main.rs
12
src/main.rs
|
|
@ -805,9 +805,15 @@ fn send_room_message(sender: Rc<RefCell<Client>>, message: &Vec<u8>, rooms: Rc<R
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut temp_mut = v.borrow_mut();
|
|
||||||
temp_mut.message_queue.extend_from_slice(&write_buf);
|
if *_k == sender_ref.id {
|
||||||
temp_mut.notify.notify();
|
sender_ref.message_queue.extend(&write_buf);
|
||||||
|
sender_ref.notify.notify();
|
||||||
|
}else {
|
||||||
|
let mut temp_mut = v.borrow_mut();
|
||||||
|
temp_mut.message_queue.extend_from_slice(&write_buf);
|
||||||
|
temp_mut.notify.notify();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue