]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: cleanup, return void from unexpected_tag()
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 16 Jul 2019 11:34:32 +0000 (19:34 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Tue, 16 Jul 2019 11:34:32 +0000 (19:34 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/ProtocolV2.cc

index 8b26a3b88913d5e2c1215a303d3f4f1512f332e4..cd5d1d97e2e9acd7261a09e8569bb4d95b03d018 100644 (file)
@@ -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<uint32_t>(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) {