From: Yingxin Cheng Date: Fri, 2 Dec 2022 08:21:55 +0000 (+0800) Subject: crimson/net: change out_state_changed to promise<> as it is not shared X-Git-Tag: v18.1.0~375^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cfd33b7eb3b0f2dd218281b65b9b755cf5a68565;p=ceph.git crimson/net: change out_state_changed to promise<> as it is not shared Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/net/Protocol.cc b/src/crimson/net/Protocol.cc index 38b0217631fc..6bdcf2db5c29 100644 --- a/src/crimson/net/Protocol.cc +++ b/src/crimson/net/Protocol.cc @@ -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); diff --git a/src/crimson/net/Protocol.h b/src/crimson/net/Protocol.h index 5957956900b9..819c7aa95048 100644 --- a/src/crimson/net/Protocol.h +++ b/src/crimson/net/Protocol.h @@ -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;