redundant
This commit is contained in:
parent
38f1f19e7a
commit
ff3a51809c
2 changed files with 10 additions and 17 deletions
|
@ -48,10 +48,9 @@ async fn main() -> Result<()> {
|
|||
});
|
||||
|
||||
let user_handler = UserHandler::new(app_state.clone());
|
||||
|
||||
let _user_handler = tokio::spawn(async move {
|
||||
tokio::spawn(async move {
|
||||
while let Some(message) = users_rx.recv().await {
|
||||
user_handler.process(message).await.unwrap();
|
||||
user_handler.process(message).await;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use crate::AppState;
|
||||
use crate::NewUser;
|
||||
use crate::User;
|
||||
use anyhow::Result;
|
||||
use lib::*;
|
||||
use serde_json::to_string;
|
||||
use std::net::SocketAddr;
|
||||
|
@ -16,7 +15,7 @@ impl UserHandler {
|
|||
UserHandler { state }
|
||||
}
|
||||
|
||||
pub async fn process(&self, message: NewUser) -> Result<()> {
|
||||
pub async fn process(&self, message: NewUser) {
|
||||
//
|
||||
// Create, Register, and Hydrate new user
|
||||
//
|
||||
|
@ -38,16 +37,13 @@ impl UserHandler {
|
|||
|
||||
// Hydrate client
|
||||
// this should probably be combined and sent as one
|
||||
message
|
||||
.sender
|
||||
.send(meta_chat_update(&self.state))
|
||||
.await
|
||||
.unwrap();
|
||||
message
|
||||
.sender
|
||||
.send(meta_server_summary_update(&self.state))
|
||||
.await
|
||||
.unwrap();
|
||||
//
|
||||
// message.sender.send(meta_chat_update(&self.state)).await;
|
||||
// message
|
||||
// .sender
|
||||
// .send(meta_server_summary_update(&self.state))
|
||||
// .await
|
||||
// .unwrap();
|
||||
message
|
||||
.sender
|
||||
.send(meta_games_browser_update(&self.state))
|
||||
|
@ -80,8 +76,6 @@ impl UserHandler {
|
|||
// this races the broadcasts but if it's done last it'll probably show up
|
||||
// last
|
||||
message.sender.send(meta_motd()).await.unwrap();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue