diff --git a/src/main.rs b/src/main.rs index c1d3c89..384c96d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 { Ok(event) => event, Err(e) => {