Closed dkl closed 3 years ago
Can we merge this pull request please? Was running into problems due to this outstanding fix multiple times now.
I'm not sure where the maintainers are but if you want I can add you to the maintainers group so you can enforce process yourself.
The
send_buffer_op_base
object only saved a reference to theboost::asio::const_buffer
object given toasync_send()
. This required callers to ensure the same life-time for the boost::asio::const_buffer as for the underlying memory it refers to, which seems like an unnecessarily strict requirement.Normally with boost::asio, the caller only has to ensure the proper life-time of the underlying memory, not the buffer object itself.
receive_buffer_op_base
already saves a copy, so it seems better forsend_buffer_op_base
to do the same.This fixes #145.