mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-14 00:35:52 +00:00
Change consume to full buffer recreate (#899)
This commit is contained in:
@@ -212,8 +212,8 @@ public:
|
||||
if (dead())
|
||||
return;
|
||||
|
||||
// Clear the buffer
|
||||
buffer_.consume(buffer_.size());
|
||||
// Note: use entirely new buffer so previously used, potentially large, capacity is deallocated
|
||||
buffer_ = boost::beast::flat_buffer{};
|
||||
|
||||
derived().ws().async_read(buffer_, boost::beast::bind_front_handler(&WsBase::onRead, this->shared_from_this()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user