]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: change out_state_changed to promise<> as it is not shared
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 2 Dec 2022 08:21:55 +0000 (16:21 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 8 Feb 2023 06:07:41 +0000 (14:07 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/Protocol.cc
src/crimson/net/Protocol.h

index 38b0217631fc1b77ecd2041e4ab4504830398033..6bdcf2db5c293e2396ca547e309eec6a24058882 100644 (file)
@@ -173,7 +173,7 @@ void Protocol::set_out_state(
   if (out_state != new_state) {
     out_state = new_state;
     out_state_changed.set_value();
-    out_state_changed = seastar::shared_promise<>();
+    out_state_changed = seastar::promise<>();
   }
 
   // The above needs to be atomic
@@ -335,7 +335,7 @@ seastar::future<> Protocol::do_out_dispatch()
       } else {
         logger().info("{} do_out_dispatch: delay ...", conn);
       }
-      return out_state_changed.get_shared_future(
+      return out_state_changed.get_future(
       ).then([] { return stop_t::no; });
      case out_state_t::drop:
       ceph_assert(out_dispatching);
index 5957956900b942aa3adfff1a7a55ee66a6bf5a80..819c7aa95048a4199daf43d430b6ccf3afa94a68 100644 (file)
@@ -167,7 +167,7 @@ class Protocol {
   out_state_t out_state = out_state_t::none;
 
   // wait until current out_state changed
-  seastar::shared_promise<> out_state_changed;
+  seastar::promise<> out_state_changed;
 
   bool out_dispatching = false;