Skip to content

Commit

Permalink
make keep-alive configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 committed Feb 9, 2024
1 parent aef1174 commit 2767b5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ async fn main() -> std::io::Result<()> {
.service(get_sol_balance),
)
})
.keep_alive(Duration::from_secs(3_600))
.keep_alive(Duration::from_secs(config.keep_alive_timeout as u64))
.bind((config.host, config.port))?
.run()
.await
Expand Down Expand Up @@ -300,6 +300,9 @@ struct GatewayConfig {
/// gateway Ws port
#[argh(option, default = "1337")]
ws_port: u16,
/// http keep-alive timeout in seconds
#[argh(option, default = "3600")]
keep_alive_timeout: u32,
/// use delegated signing mode, provide the delegator's pubkey
#[argh(option)]
delegate: Option<String>,
Expand Down

0 comments on commit 2767b5d

Please sign in to comment.