Skip to content

Commit be44d50

Browse files
committed
Merge pull request cpp-netlib#469 from wujunzhuo/0.11-devel
Update async_connection.hpp
2 parents e5dcaa6 + 6afd3a7 commit be44d50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

boost/network/protocol/http/server/async_connection.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,12 @@ struct async_connection
294294
if (new_start != read_buffer_.begin()) {
295295
input_range input =
296296
boost::make_iterator_range(new_start, read_buffer_.end());
297+
buffer_type::iterator start_tmp = new_start;
298+
new_start = read_buffer_.begin();
297299
thread_pool().post(
298300
boost::bind(callback, input, boost::system::error_code(),
299-
std::distance(new_start, data_end),
301+
std::distance(start_tmp, data_end),
300302
async_connection<Tag, Handler>::shared_from_this()));
301-
new_start = read_buffer_.begin();
302303
return;
303304
}
304305

0 commit comments

Comments
 (0)