]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/net: move from out_q into sent queue
authorKefu Chai <kchai@redhat.com>
Fri, 4 Jun 2021 12:19:30 +0000 (20:19 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 4 Jun 2021 12:21:52 +0000 (20:21 +0800)
to avoid the refcounting of underlying RefCountedObject.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/net/Protocol.cc

index 75a60b32985721fff5e45bedf13b1154109d8797..804a80923d6480dce5beac791fbad747a95ad370 100644 (file)
@@ -103,8 +103,8 @@ ceph::bufferlist Protocol::sweep_messages_and_move_to_sent(
                                           require_ack);
   if (!conn.policy.lossy) {
     conn.sent.insert(conn.sent.end(),
-                     conn.out_q.begin(),
-                     conn.out_q.end());
+                     std::make_move_iterator(conn.out_q.begin()),
+                     std::make_move_iterator(conn.out_q.end()));
   }
   conn.out_q.clear();
   return bl;