diff options
author | Sage Weil <sage@inktank.com> | 2013-07-15 17:16:23 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-24 16:20:36 -0700 |
commit | 1ed51ad535612d5c444a3cc35a331f5e6a68ce30 (patch) | |
tree | 24da4600eced03931801f4ae3ebbbcc123055702 | |
parent | 2f696f17a413015a3038d5aa76d18fe94f503f03 (diff) | |
download | ceph-1ed51ad535612d5c444a3cc35a331f5e6a68ce30.tar.gz |
msgr: close accepting_pipes from mark_down_all()
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)
-rw-r--r-- | src/msg/SimpleMessenger.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index 09bbb79ec92..82f8a508a64 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -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; |