From: Yingxin Cheng Date: Tue, 16 Jul 2019 11:34:32 +0000 (+0800) Subject: crimson/net: cleanup, return void from unexpected_tag() X-Git-Tag: v15.1.0~2161^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b59fddda3b290448603d741abd5f06e5ca78b531;p=ceph.git crimson/net: cleanup, return void from unexpected_tag() Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/net/ProtocolV2.cc b/src/crimson/net/ProtocolV2.cc index 8b26a3b8891..cd5d1d97e2e 100644 --- a/src/crimson/net/ProtocolV2.cc +++ b/src/crimson/net/ProtocolV2.cc @@ -52,12 +52,12 @@ inline void expect_tag(const Tag& expected, } } -inline seastar::future<> unexpected_tag(const Tag& unexpected, - ceph::net::SocketConnection& conn, - const char *where) { +inline void unexpected_tag(const Tag& unexpected, + ceph::net::SocketConnection& conn, + const char *where) { logger().error("{} {} received unexpected tag: {}", conn, where, static_cast(unexpected)); - return abort_in_fault(); + abort_in_fault(); } } // namespace anonymous @@ -546,7 +546,8 @@ seastar::future<> ProtocolV2::handle_auth_reply() return finish_auth(); }); default: { - return unexpected_tag(tag, conn, __func__); + unexpected_tag(tag, conn, __func__); + return seastar::now(); } } }); @@ -1554,8 +1555,10 @@ void ProtocolV2::execute_ready() logger().trace("{} got KEEPALIVE_ACK {}", conn, conn.last_keepalive_ack); }); - default: - return unexpected_tag(tag, conn, "execute_ready"); + default: { + unexpected_tag(tag, conn, "execute_ready"); + return seastar::now(); + } } }); }).handle_exception([this] (std::exception_ptr eptr) {