mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
fixes login locking up after refresh
This commit is contained in:
committed by
Aiden McClelland
parent
0d96007c2f
commit
50f14fe040
@@ -148,6 +148,10 @@ async fn deal_with_messages(
|
||||
}
|
||||
return Ok(())
|
||||
}
|
||||
None => {
|
||||
tracing::info!("Closing WebSocket: Stream Finished");
|
||||
return Ok(())
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,12 +39,16 @@ impl HasLoggedOutSessions {
|
||||
.by_ref()
|
||||
.map(|x| x.as_logout_session_id())
|
||||
.collect::<Vec<_>>();
|
||||
sqlx::query(&format!(
|
||||
"UPDATE session SET logged_out = CURRENT_TIMESTAMP WHERE id IN ('{}')",
|
||||
sessions.join("','")
|
||||
))
|
||||
.execute(&mut ctx.secret_store.acquire().await?)
|
||||
.await?;
|
||||
let mut sqlx_conn = ctx.secret_store.acquire().await?;
|
||||
for session in &sessions {
|
||||
sqlx::query!(
|
||||
"UPDATE session SET logged_out = CURRENT_TIMESTAMP WHERE id = ?",
|
||||
session
|
||||
)
|
||||
.execute(&mut sqlx_conn)
|
||||
.await?;
|
||||
}
|
||||
drop(sqlx_conn);
|
||||
for session in sessions {
|
||||
for socket in ctx
|
||||
.open_authed_websockets
|
||||
|
||||
Reference in New Issue
Block a user