]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: close accepting_pipes from mark_down_all()
authorSage Weil <sage@inktank.com>
Tue, 16 Jul 2013 00:16:23 +0000 (17:16 -0700)
committerSage Weil <sage@inktank.com>
Wed, 24 Jul 2013 23:20:36 +0000 (16:20 -0700)
We need to catch these pipes too, particularly when doing a rebind(),
to avoid them leaking through.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 687fe888b32ac9d41595348dfc82111c8dbf2fcb)

src/msg/SimpleMessenger.cc

index 09bbb79ec92f234eb4c08884b38ec3b8151c7e5e..82f8a508a6492ac9d9a6e5431603a8e98852009e 100644 (file)
@@ -556,6 +556,17 @@ void SimpleMessenger::mark_down_all()
 {
   ldout(cct,1) << "mark_down_all" << dendl;
   lock.Lock();
+  for (set<Pipe*>::iterator q = accepting_pipes.begin(); q != accepting_pipes.end(); ++q) {
+    Pipe *p = *q;
+    ldout(cct,5) << "mark_down_all accepting_pipe " << p << dendl;
+    p->pipe_lock.Lock();
+    p->stop();
+    if (p->connection_state)
+      p->connection_state->clear_pipe(p);
+    p->pipe_lock.Unlock();
+  }
+  accepting_pipes.clear();
+
   while (!rank_pipe.empty()) {
     hash_map<entity_addr_t,Pipe*>::iterator it = rank_pipe.begin();
     Pipe *p = it->second;