mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Use events API to eager send attestations (#7892)
Co-Authored-By: hopinheimer <knmanas6@gmail.com> Co-Authored-By: hopinheimer <48147533+hopinheimer@users.noreply.github.com> Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -3226,7 +3226,19 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
|
||||
let s = futures::stream::select_all(receivers);
|
||||
|
||||
Ok(warp::sse::reply(warp::sse::keep_alive().stream(s)))
|
||||
let response = warp::sse::reply(warp::sse::keep_alive().stream(s));
|
||||
|
||||
// Set headers to bypass nginx caching and buffering, which breaks realtime
|
||||
// delivery.
|
||||
let response = warp::reply::with_header(response, "X-Accel-Buffering", "no");
|
||||
let response = warp::reply::with_header(response, "X-Accel-Expires", "0");
|
||||
let response = warp::reply::with_header(
|
||||
response,
|
||||
"Cache-Control",
|
||||
"no-cache, no-store, must-revalidate",
|
||||
);
|
||||
|
||||
Ok(response)
|
||||
})
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user