Permalink
Browse files

Merge pull request #114 from uzakmat/develop

Propagate EOF from reader into handler as error code.
  • Loading branch information...
2 parents ad9cc36 + aa77e49 commit 6da614198b56b88c6741b789cf5257f685ffe145 @mikedickey mikedickey committed on GitHub Jul 29, 2016
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/http_reader.cpp
View
@@ -59,7 +59,11 @@ void reader::consume_bytes(const boost::system::error_code& read_error,
// set pointers for new HTTP header data to be consumed
set_read_buffer(m_tcp_conn->get_read_buffer().data(), bytes_read);
- consume_bytes();
+ if ( eof() ) {
+ finished_reading(make_error_code(boost::asio::error::eof));
+ } else {
+ consume_bytes();
+ }
}

0 comments on commit 6da6141

Please sign in to comment.