]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monc: restart auth handshake each time we connect to mon
authorSage Weil <sage@newdream.net>
Thu, 19 Nov 2009 20:42:29 +0000 (12:42 -0800)
committerSage Weil <sage@newdream.net>
Thu, 19 Nov 2009 20:42:29 +0000 (12:42 -0800)
src/mon/MonClient.cc

index e7ec0d5768630fd402e4f3152c48ca34e3cae780..23e164930c39064b70968831a5e4d3108ea51b43 100644 (file)
@@ -370,17 +370,15 @@ void MonClient::_reopen_session()
     waiting_for_session.pop_front();
   }
 
-  // restart authentication process?
-  if (state != MC_STATE_HAVE_SESSION) {
-    state = MC_STATE_NEGOTIATING;
-
-    MAuth *m = new MAuth;
-    m->protocol = 0;
-    ::encode(auth_supported, m->auth_payload);
-    ::encode(entity_name, m->auth_payload);
-    ::encode(global_id, m->auth_payload);
-    _send_mon_message(m, true);
-  }
+  // restart authentication handshake
+  state = MC_STATE_NEGOTIATING;
+
+  MAuth *m = new MAuth;
+  m->protocol = 0;
+  ::encode(auth_supported, m->auth_payload);
+  ::encode(entity_name, m->auth_payload);
+  ::encode(global_id, m->auth_payload);
+  _send_mon_message(m, true);
 
   if (!sub_have.empty())
     _renew_subs();