From: Max Kellermann Date: Tue, 8 Oct 2024 12:52:13 +0000 (+0200) Subject: msg/async/AsyncConnection: move the writeCallback instead of copying it X-Git-Tag: v20.0.0~792^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=425fc4d21d33a8f1e7b47e7698a8c5b97bba71b3;p=ceph.git msg/async/AsyncConnection: move the writeCallback instead of copying it Signed-off-by: Max Kellermann --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 649977e5b969..ab3d454748e3 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -310,7 +310,7 @@ ssize_t AsyncConnection::write(ceph::buffer::list &bl, outgoing_bl.claim_append(bl); ssize_t r = _try_send(more); if (r > 0) { - writeCallback = callback; + writeCallback = std::move(callback); } return r; }