Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/http/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ impl From<&Configuration> for Newtype<httpd_config_t> {
max_resp_headers: conf.max_resp_headers as _,
backlog_conn: 5,
lru_purge_enable: conf.lru_purge_enable,
recv_wait_timeout: 5,
send_wait_timeout: 5,
recv_wait_timeout: conf.session_timeout.as_secs() as u16,
Copy link
Collaborator

@ivmarkov ivmarkov Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think max_sessions and session_timeout (which are currently unused) are remnants from the old HTTP server, which did aim at supporting HTTP sessions.

Perhaps it is not a very wise idea to reuse something called session_timeout for TCP socket receive/send timeout.

I would rather suggest that you introduce two additional Option<Duration> parameters, named send_wait_timeout and recv_wait_timeout, and you use those instead. And delete the session_timeout and max_sessions unused parameters.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

send_wait_timeout: conf.session_timeout.as_secs() as u16,
global_user_ctx: ptr::null_mut(),
global_user_ctx_free_fn: None,
global_transport_ctx: ptr::null_mut(),
Expand Down
Loading