diff options
Diffstat (limited to 'include/nbd_proxy.hpp')
-rw-r--r-- | include/nbd_proxy.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp index 17d57b4c15..838e7a1d2c 100644 --- a/include/nbd_proxy.hpp +++ b/include/nbd_proxy.hpp @@ -125,9 +125,9 @@ struct NbdProxyServer : std::enable_shared_from_this<NbdProxyServer> void send(std::string_view buffer, std::function<void()>&& onDone) { - boost::asio::buffer_copy(ws2uxBuf.prepare(buffer.size()), - boost::asio::buffer(buffer)); - ws2uxBuf.commit(buffer.size()); + size_t copied = boost::asio::buffer_copy( + ws2uxBuf.prepare(buffer.size()), boost::asio::buffer(buffer)); + ws2uxBuf.commit(copied); doWrite(std::move(onDone)); } |