diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d72aa3a..83d46800 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 161: + +* Don't copy the handler in write_some_op + +-------------------------------------------------------------------------------- + Version 160: * Examples clear the HTTP message before reading diff --git a/include/boost/beast/websocket/impl/write.ipp b/include/boost/beast/websocket/impl/write.ipp index a34f66e9..5d4a9d68 100644 --- a/include/boost/beast/websocket/impl/write.ipp +++ b/include/boost/beast/websocket/impl/write.ipp @@ -561,7 +561,7 @@ operator()( if(! cont_) return boost::asio::post( ws_.stream_.get_executor(), - bind_handler(h_, ec, bytes_transferred_)); + bind_handler(std::move(h_), ec, bytes_transferred_)); h_(ec, bytes_transferred_); } }