Commit 9ed75df6 authored by Dominik Charousset's avatar Dominik Charousset

Gracefully handle want_read returned by read_some

parent 86529f43
...@@ -150,6 +150,8 @@ bool stream::handle_read_result(rw_state read_result, size_t rb) { ...@@ -150,6 +150,8 @@ bool stream::handle_read_result(rw_state read_result, size_t rb) {
backend().add(operation::write, fd(), this); backend().add(operation::write, fd(), this);
wr_op_backoff_ = false; wr_op_backoff_ = false;
} }
[[fallthrough]];
case rw_state::want_read:
if (rb == 0) if (rb == 0)
return false; return false;
collected_ += rb; collected_ += rb;
...@@ -162,9 +164,6 @@ bool stream::handle_read_result(rw_state read_result, size_t rb) { ...@@ -162,9 +164,6 @@ bool stream::handle_read_result(rw_state read_result, size_t rb) {
} }
} }
break; break;
case rw_state::want_read:
CAF_LOG_ERROR("handle_read_result encountered rw_state::want_read");
return false;
} }
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment