]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: use Connection::peer_is_mon()
authorKefu Chai <kchai@redhat.com>
Sun, 30 Jun 2019 10:04:28 +0000 (18:04 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Jul 2019 03:05:54 +0000 (11:05 +0800)
always prefer using interface over its implementation

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

index 7e8f7e18c24a6357048accef3c2eeab7b1b3b22f..e42378e00f7bb8cd5e762003c216df215bdfaf40 100644 (file)
@@ -172,7 +172,7 @@ void ProtocolV1::reset_session()
 seastar::future<stop_t>
 ProtocolV1::handle_connect_reply(msgr_tag_t tag)
 {
-  if (h.auth_payload.length() && conn.peer_type != CEPH_ENTITY_TYPE_MON) {
+  if (h.auth_payload.length() && !conn.peer_is_mon()) {
     if (tag == CEPH_MSGR_TAG_CHALLENGE_AUTHORIZER) { // more
       h.auth_more = messenger.get_auth_client()->handle_auth_reply_more(
           conn.shared_from_this(), auth_meta, h.auth_payload);