Commit dff483fd authored by Jakob Otto's avatar Jakob Otto

Move to CAF_ASSERT()

parent 8d93bbab
...@@ -265,10 +265,7 @@ private: ...@@ -265,10 +265,7 @@ private:
return false; return false;
do { do {
auto& buf = write_queue_.front().second; auto& buf = write_queue_.front().second;
if (buf.empty()) { CAF_ASSERT(!buf.empty());
recycle();
continue;
}
auto data = buf.data() + written_; auto data = buf.data() + written_;
auto len = buf.size() - written_; auto len = buf.size() - written_;
auto write_ret = write(handle_, make_span(data, len)); auto write_ret = write(handle_, make_span(data, len));
......
...@@ -74,8 +74,7 @@ public: ...@@ -74,8 +74,7 @@ public:
template <class Parent> template <class Parent>
void write_message(Parent& parent, void write_message(Parent& parent,
std::unique_ptr<endpoint_manager_queue::message> ptr) { std::unique_ptr<endpoint_manager_queue::message> ptr) {
auto header_buf = parent.next_header_buffer(); parent.write_packet(ptr->payload);
parent.write_packet(header_buf, ptr->payload);
} }
template <class Parent> template <class Parent>
......
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