update on time
This commit is contained in:
parent
89344c6042
commit
d04908ed1e
1 changed files with 10 additions and 11 deletions
|
@ -128,16 +128,6 @@ impl MessageHandler {
|
|||
.name
|
||||
.clone();
|
||||
|
||||
// Send client updates
|
||||
self.state
|
||||
.broadcast_tx
|
||||
.send(meta_server_summary_update(&self.state))
|
||||
.unwrap();
|
||||
self.state
|
||||
.broadcast_tx
|
||||
.send(meta_chat_update(&self.state))
|
||||
.unwrap();
|
||||
|
||||
// Announce User left in chat
|
||||
let msg = ChatMessage {
|
||||
text: format!("{0} left.", &user_name),
|
||||
|
@ -161,7 +151,6 @@ impl MessageHandler {
|
|||
}
|
||||
|
||||
// Move user to offline
|
||||
// This should probably happen first/immediately but moving down here avoids a clone
|
||||
self.state.offline_users.write().unwrap().insert(
|
||||
user_name,
|
||||
self.state
|
||||
|
@ -171,5 +160,15 @@ impl MessageHandler {
|
|||
.remove(&addr)
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
// Send client updates
|
||||
self.state
|
||||
.broadcast_tx
|
||||
.send(meta_server_summary_update(&self.state))
|
||||
.unwrap();
|
||||
self.state
|
||||
.broadcast_tx
|
||||
.send(meta_chat_update(&self.state))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue