Synchronious write stream handling fix#1000
Merged
gittiver merged 4 commits intoCrowCpp:masterfrom Feb 20, 2025
Merged
Conversation
added 2 commits
February 17, 2025 18:32
gittiver
reviewed
Feb 18, 2025
Member
|
Maybe it fixes: |
bg-softcom
suggested changes
Feb 19, 2025
Contributor
Author
|
@gittiver , I believe this pull request is merge-ready. Could you please look into it? |
gittiver
approved these changes
Feb 20, 2025
Member
gittiver
left a comment
There was a problem hiding this comment.
Please see my comment on test, will merge this but this should be fixed in a separate PR maybe.
| auto end = std::chrono::high_resolution_clock::now(); | ||
| std::chrono::seconds testDuration = std::chrono::duration_cast<std::chrono::seconds>(end - start); | ||
|
|
||
| CHECK(testDuration.count() < explicitTimeout); |
Member
There was a problem hiding this comment.
Is a time of one second and 200s really needed for the test?
Lets assume a 100ms delay, then we would at least end up with 20s (worst case).
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.
I encountered a problem with handling sequential requests. In particular, some of the responses stalled until timeout. After some research, it was found that the reason for such a behavior was my previous pull request, that changed response handling in a way of making all such handling synchronous. While synchronicity itself has not proven problematic, it was found that some of the response management done in
do_writeis absent indo_write_sync. That is, clearing the response body and the http_connection parsers is not done.That has been fixed, and
bug_quick_repeated_requestwas change in such a way as to show the problem via staling on previous version and passing on current.