]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/AsyncConnection: move the writeCallback instead of copying it 60220/head
authorMax Kellermann <max.kellermann@ionos.com>
Tue, 8 Oct 2024 12:52:13 +0000 (14:52 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Wed, 9 Oct 2024 21:15:15 +0000 (23:15 +0200)
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/msg/async/AsyncConnection.cc

index 649977e5b9697fd7861f081a3f2bd65df1db49d2..ab3d454748e3484c9d70627784ecbd36e6bea044 100644 (file)
@@ -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;
 }