]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: ignore stray reconnects
authorSage Weil <sage@newdream.net>
Mon, 20 Jul 2009 17:58:53 +0000 (10:58 -0700)
committerSage Weil <sage@newdream.net>
Mon, 20 Jul 2009 18:03:52 +0000 (11:03 -0700)
Although maybe we should force open a session for these stray
clients?

src/mds/Server.cc

index 2e24c472726c97849db0f4da2b181334d6f813dc..a75b1fa3011ac1d0825d45fc0762c6d91a038f36 100644 (file)
@@ -441,6 +441,13 @@ void Server::handle_client_reconnect(MClientReconnect *m)
   int from = m->get_source().num();
   Session *session = mds->sessionmap.get_session(m->get_source());
 
+  if (!session) {
+    dout(1) << " no session for " << m->get_source() << ", ignoring reconnect, sending close" << dendl;
+    mds->messenger->send_message(new MClientSession(CEPH_SESSION_CLOSE), m->get_source_inst());
+    delete m;
+    return;
+  }
+
   if (m->closed) {
     dout(7) << " client had no session, removing from session map" << dendl;
     assert(session);  // ?