Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fixed read timeout in chucked content response for sync keep-alive client#327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@mepahoo
Copy link

After some testing, i noticed the keep-alive sync http client waited about 20 seconds before returning a trivial content (about 111 bytes). I tracked it down to this fix. The problem was that boost::asio::read is called, even if there are enough bytes in the current stream buffer. This causes read to wait until timeout (which on my windows platform was 20 secs, apparently). The fix is to not read if there are enough bytes in the current stream buffer. I am also counting 2 extra bytes for "\r\n" that comes after each chunk.

Copy link
Member

Choose a reason for hiding this comment

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

nit: I would prefer you call this variablebytes_to_read.

@deanberris
Copy link
Member

Generally, LGTM -- but if you have time to address that nit, I would appreciate it very much. :)

Thanks@mepahoo !

@deanberris
Copy link
Member

Cool, thanks -- this LGTM. Sorry for the delay, I didn't know it was ready for another look. :)

deanberris added a commit that referenced this pull requestNov 24, 2013
fixed read timeout in chucked content response for sync keep-alive client
@deanberrisdeanberris merged commit472a4ad intocpp-netlib:0.10-develNov 24, 2013
leecoder pushed a commit to leecoder/cpp-netlib that referenced this pull requestApr 14, 2015
fixed read timeout in chucked content response for sync keep-alive client
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@deanberrisdeanberris

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@mepahoo@deanberris@nwerensteijn

[8]ページ先頭

©2009-2025 Movatter.jp