Skip to content

Commit

Permalink
fix(backend): fix login dialog not showing up on page change
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenclaw900 committed Feb 23, 2022
1 parent ae2284d commit 979655b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/src/socket_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub async fn socket_handler(socket: warp::ws::WebSocket) {
continue;
};
if CONFIG.pass && !validate_token(&req.token) {
quit_send.notify_one();
data_send
.send(shared::Request {
page: "/login".to_string(),
Expand All @@ -82,7 +83,7 @@ pub async fn socket_handler(socket: warp::ws::WebSocket) {
}
if req.cmd.is_empty() {
// Quit out of handler
quit_send.notify_waiters();
quit_send.notify_one();
}
// Send new page/data
if data_send.send(req.clone()).await.is_err() {
Expand Down

0 comments on commit 979655b

Please sign in to comment.