Fix Sse keepalive build error (#4725)

This commit is contained in:
Amos Wenger authored and GitHub committed 2025-10-04 18:08:01 -07:00
1 parent 7a4a0ca181
commit a4aef33369
1 file changed
+4 -4
+4 -4
View File
@@ -350,15 +350,15 @@ mod server_impl {
impl<T> IntoResponse for ServerEvents<T> {
fn into_response(self) -> axum_core::response::Response {
let mut sse = self
let sse = self
.sse
.expect("SSE should be initialized before using it as a response");
if let Some(keep_alive) = self.keep_alive {
sse = sse.keep_alive(keep_alive)
sse.keep_alive(keep_alive).into_response()
} else {
sse.into_response()
}
sse.into_response()
}
}