Commit bd83338c authored by Jakob Otto's avatar Jakob Otto

Fix offset bug

parent 9b46d1de
......@@ -39,7 +39,8 @@ pollset_updater::~pollset_updater() {
bool pollset_updater::handle_read_event() {
for (;;) {
auto res = read(handle(), make_span(buf_.data(), buf_.size() - buf_size_));
auto res = read(handle(), make_span(buf_.data() + buf_size_,
buf_.size() - buf_size_));
if (auto num_bytes = get_if<size_t>(&res)) {
buf_size_ += *num_bytes;
if (buf_.size() == buf_size_) {
......
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