shorten ping time

This commit is contained in:
2020-10-22 12:24:38 -07:00
parent 4f59b256f5
commit 2050daae13

View File

@@ -52,7 +52,8 @@ async fn main() {
events_clients.lock().unwrap().push(tx);
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())
}),