mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Don't kill SSE stream if channel fills up (#4500)
## Issue Addressed Closes #4245 ## Proposed Changes - If an SSE channel fills up, send a comment instead of terminating the stream. - Add a CLI flag for scaling up the SSE buffer: `--http-sse-capacity-multiplier N`. ## Additional Info ~~Blocked on #4462. I haven't rebased on that PR yet for initial testing, because it still needs some more work to handle long-running HTTP threads.~~ - [x] Add CLI flag tests.
This commit is contained in:
@@ -382,6 +382,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON \
|
||||
MAINNET.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-sse-capacity-multiplier")
|
||||
.long("http-sse-capacity-multiplier")
|
||||
.takes_value(true)
|
||||
.default_value("1")
|
||||
.value_name("N")
|
||||
.help("Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. \
|
||||
Increasing this value can prevent messages from being dropped.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-enable-beacon-processor")
|
||||
.long("http-enable-beacon-processor")
|
||||
|
||||
@@ -149,6 +149,9 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.http_api.allow_sync_stalled = true;
|
||||
}
|
||||
|
||||
client_config.http_api.sse_capacity_multiplier =
|
||||
parse_required(cli_args, "http-sse-capacity-multiplier")?;
|
||||
|
||||
client_config.http_api.enable_beacon_processor =
|
||||
parse_required(cli_args, "http-enable-beacon-processor")?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user