This commit is contained in:
Tony Rewin 2023-10-03 07:47:24 +03:00
parent 9e181fe303
commit 2dd5eb6307

View File

@ -82,7 +82,7 @@ async fn create_first_chat(author_id: i32, con: &mut redis::aio::Connection) ->
.query_async(con)
.await?;
Ok(vec![chat_id, ])
Ok(vec![chat_id])
}
async fn sse_handler(
@ -148,14 +148,6 @@ async fn sse_handler(
}
}
let _ = match con.srem::<&str, &i32, usize>("authors-online", &author_id).await {
Ok(_) => (),
Err(e) => {
eprintln!("Failed to remove author from online list: {}", e);
return HttpResponse::InternalServerError().finish();
}
};
let server_event = match rx.recv().await {
Ok(event) => event,
Err(e) => {