Fix lifetime of memory_region

This commit is contained in:
Dennis Klein 2019-03-01 15:50:56 +01:00 committed by Dennis Klein
parent 2eb09df1f7
commit 53a5456d8c

View File

@ -366,7 +366,7 @@ auto Socket::OnSend(azmq::message& zmsg, size_t /*bytes_transferred*/) -> void
asiofi::memory_region mr(*fOfiDomain, ctrl_msg, asiofi::mr::access::send); asiofi::memory_region mr(*fOfiDomain, ctrl_msg, asiofi::mr::access::send);
auto desc = mr.desc(); auto desc = mr.desc();
fControlEndpoint->send( fControlEndpoint->send(
ctrl_msg, desc, [&, ctrl2 = std::move(ctrl)](boost::asio::mutable_buffer) mutable { ctrl_msg, desc, [&, ctrl2 = std::move(ctrl), mr2 = std::move(mr)](boost::asio::mutable_buffer) mutable {
// LOG(debug) << "OFI transport (" << fId << "): >>>>> Control message sent"; // LOG(debug) << "OFI transport (" << fId << "): >>>>> Control message sent";
}); });
} else { } else {