fix http server timeouts - #596
Draft
mirecta wants to merge 1 commit into
Draft
Conversation
ivmarkov
requested changes
Aug 13, 2025
| 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, |
Collaborator
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo fmtcommand to ensure that all changed code is formatted correctly.cargo clippycommand to ensure that all changed code passes latest Clippy nightly lints.CHANGELOG.mdin the proper section.Pull Request Details 📖
Description
Now HTTP server accept timeouts from config not hardcoded 5 seconds
Testing
I set timeout for large file which receive exceed 5 seconds and it works now