mirror of
https://github.com/shiroyashik/sculptor.git
synced 2025-12-06 13:01:12 +03:00
added close frame
This commit is contained in:
parent
21ffa5c747
commit
bd101fc3fa
2 changed files with 43 additions and 52 deletions
|
|
@ -99,9 +99,10 @@ async fn handle_socket(mut socket: WebSocket, state: AppState) {
|
|||
};
|
||||
},
|
||||
None => {
|
||||
warn!("[WebSocket] Authentication error! Connection terminated!");
|
||||
warn!("[WebSocket] Authentication error! Sending close with Re-auth code.");
|
||||
debug!("[WebSocket] Tried to log in with {token}"); // Tried to log in with token: {token}
|
||||
break;
|
||||
debug!("{:?}", socket.send(Message::Close(Some(axum::extract::ws::CloseFrame { code: 4000, reason: "Re-auth".into() }))).await);
|
||||
continue;
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue