shorten ping time
This commit is contained in:
@@ -52,7 +52,8 @@ async fn main() {
|
|||||||
events_clients.lock().unwrap().push(tx);
|
events_clients.lock().unwrap().push(tx);
|
||||||
|
|
||||||
let stream = stream::select(
|
let stream = stream::select(
|
||||||
interval(Duration::from_secs(5)).map(move |_| {
|
interval(Duration::from_secs(3)).map(move |_| {
|
||||||
|
trace!("sending sse keepalive ping");
|
||||||
Ok::<_, Infallible>((sse::event("ping"), sse::data("")).into_a())
|
Ok::<_, Infallible>((sse::event("ping"), sse::data("")).into_a())
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user