Actually, _read_buffer_wptr < eptr shall never happen due to buffer shift. See below. That shall only require remaining bytes read. As soon as remaining < max_msg_size, the second condition is always true.