Skip to content

Commit b43d8a1

Browse files
committed
fix: compilation error with new axum
1 parent 7a2127e commit b43d8a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

broker/src/serve_health.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{collections::HashMap, convert::Infallible, marker::PhantomData, sync::Arc, time::{Duration, SystemTime}};
22

3-
use axum::{extract::{Path, State}, http::StatusCode, response::{sse::{Event, KeepAlive}, Response, Sse}, routing::get, Json, Router};
3+
use axum::{extract::{Path, State}, http::StatusCode, response::{sse::{Event, KeepAlive, KeepAliveStream}, Response, Sse}, routing::get, Json, Router};
44
use axum_extra::{headers::{authorization::Basic, Authorization}, TypedHeader};
55
use beam_lib::ProxyId;
66
use futures_core::Stream;
@@ -132,7 +132,7 @@ async fn proxy_health(
132132
async fn get_control_tasks(
133133
State(state): State<Arc<RwLock<Health>>>,
134134
proxy_auth: Authorized,
135-
) -> Result<Sse<ForeverStream>, StatusCode> {
135+
) -> Result<Sse<KeepAliveStream<ForeverStream>>, StatusCode> {
136136
let proxy_id = proxy_auth.get_from().proxy_id();
137137
// Once this is freed the connection will be removed from the map of connected proxies again
138138
// This ensures that when the connection is dropped and therefore this response future the status of this proxy will be updated

0 commit comments

Comments
 (0)