Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug of async_read_until not completing immediately #466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpusz
Copy link

@mpusz mpusz commented Mar 20, 2020

Fixed bug of async_read_until not completing immediately when a provided streambuf already contains the delimiter.

Fixed bug of async_read_until not completing immediately when a provided `streambuf` already contains the delimiter.
@Boilerguy
Copy link

Hi, I have a couple of things to comment:

  1. There are several places to have the same flow in the file except the place you patched. Should we fix them too?
  2. The "start" is the argument passed into. So if we assign a value to it, I think we need another variable.

@mpusz
Copy link
Author

mpusz commented Mar 28, 2020

There are several places to have the same flow in the file except the place you patched. Should we fix them too?

I didn't fix others because I did not know about them. I just run into this particular one and fixed it. But yes, all the bugs we are aware of should be addressed 😉

The "start" is the argument passed into. So if we assign a value to it, I think we need another variable.

This depends on the coding conventions. It is fine to override function arguments and lots of code is doing it (i.e. see the reference implementations here: https://en.cppreference.com/w/cpp/algorithm/find). However, if @chriskohlhoff would like me to create a dedicated variable for this one than I will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants