Browse files

don't reset pop stream when waiting

  • Loading branch information...
1 parent a16f06e commit b42fea7d39a834114b68df65ba4e7983ddd6a6a4 @erikfrey erikfrey committed Aug 13, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/net/handler.cpp
View
5 src/net/handler.cpp
@@ -200,13 +200,14 @@ void handler::get()
if (!pop_stream_->read(buf_))
{
- pop_stream_.reset();
-
// couldn't read... can we at least wait?
if (req_.wait_ms)
queues_[req_.queue].wait(req_.wait_ms, bind(&handler::get_on_queue_return, shared_from_this(), _1));
else
+ {
+ pop_stream_.reset();
return done(true, "END\r\n");
+ }
}
else
write_first_chunk();

0 comments on commit b42fea7

Please sign in to comment.