leftovers
This commit is contained in:
parent
22af4d94d6
commit
b653687c81
1 changed files with 2 additions and 2 deletions
|
@ -28,11 +28,11 @@ fn server_sum_update(state: &Arc<AppState>) -> ServerStateSummary {
|
|||
}
|
||||
|
||||
pub async fn on_websocket_connection(stream: WebSocket, state: Arc<AppState>, addr: SocketAddr) {
|
||||
// Add User to users
|
||||
let new_user = User {
|
||||
name: "Anonymous".to_string(),
|
||||
};
|
||||
let res = state.users.lock().unwrap().insert(addr.clone(), new_user);
|
||||
tracing::debug!("{:#?}", res);
|
||||
state.users.lock().unwrap().insert(addr, new_user);
|
||||
|
||||
// By splitting, we can send and receive at the same time.
|
||||
let (mut sender, mut receiver) = stream.split();
|
||||
|
|
Loading…
Add table
Reference in a new issue