···9393 match try_revive {
9494 Some(token) => {
9595 let appstate = state.0.clone();
9696- let db = &appstate.db.lock().await;
9696+ let db = &appstate.db;
9797 match User::revive_session_from_token(token.clone(), db).await {
9898 Ok(user) => {
9999 incoming_elog!(ev_log, "Session revived for user: {}",
···155155 // register the user
156156 {
157157 let appstate = state.0.clone();
158158- let db = &appstate.db.lock().await;
158158+ let db = &appstate.db;
159159 match User::create_user(email.clone(), username.clone(), password, db).await
160160 {
161161 Ok(user) => {
···246246 }
247247 Ok(Message::RegisterPrecheck { email, username, password }) => {
248248 let appstate = state.0.clone();
249249- let db = &appstate.db.lock().await;
249249+ let db = &appstate.db;
250250 match crate::user::register_validitycheck(email, username, password, db).await {
251251 Err(LuminaError::RegisterEmailInUse) => {
252252 let _ = stream.send(ws::Message::from(msgtojson(Message::RegisterPrecheckResponse {
···294294 let _ = stream.send(ws::Message::from(msgtojson(Message::AuthFailure))).await;
295295 } else {
296296 let appstate = state.0.clone();
297297- let db = &appstate.db.lock().await;
297297+ let db = &appstate.db;
298298 let msgback = match User::authenticate(email_username.clone(), password, db, ev_log.clone()).await {
299299 Ok((session_reference, user)) => {
300300 incoming_elog!(ev_log,"User {} authenticated to session with id {}.\n{}", user.username.clone().color_bright_cyan(), session_reference.session_id.to_string().color_pink(), format!("(User id: {})", user.id).style_dim());
···351351 }
352352 Ok(Message::TimelineRequest { by_name: name, page }) => {
353353 let appstate = state.0.clone();
354354- let db = &appstate.db.lock().await;
354354+ let db = &appstate.db;
355355 // Fetch post IDs for the requested timeline
356356 match fetch_timeline_post_ids_by_timeline_name(
357357 ev_log.clone(),