aquatic_http: add keep_alive setting (default true)

This might be good for performance in the real world. It also
enables fairer load test comparisons with opentracker, which
in my understanding drops connections after sending responses.
This commit is contained in:
Joakim Frostegård 2020-08-02 20:06:49 +02:00
parent 8caae958fd
commit 427c0bc7c3
2 changed files with 7 additions and 1 deletions

View file

@ -55,6 +55,7 @@ pub struct NetworkConfig {
pub ipv6_only: bool,
#[serde(flatten)]
pub tls: TlsConfig,
pub keep_alive: bool,
pub poll_event_capacity: usize,
pub poll_timeout_microseconds: u64,
}
@ -128,6 +129,7 @@ impl Default for NetworkConfig {
address: SocketAddr::from(([0, 0, 0, 0], 3000)),
ipv6_only: false,
tls: TlsConfig::default(),
keep_alive: true,
poll_event_capacity: 4096,
poll_timeout_microseconds: 10_000,
}