This commit is contained in:
Tony Rewin 2023-10-03 07:52:48 +03:00
parent 2dd5eb6307
commit cb71f0aa20

View File

@ -148,6 +148,14 @@ 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 { let server_event = match rx.recv().await {
Ok(event) => event, Ok(event) => event,
Err(e) => { Err(e) => {