diff options
author | Sage Weil <sage@inktank.com> | 2013-07-15 17:16:23 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-17 14:39:04 -0700 |
commit | 687fe888b32ac9d41595348dfc82111c8dbf2fcb (patch) | |
tree | ab827b4c6c717b710856b1c95d66f876ec305d67 | |
parent | dd4addef2d5b457cc9a58782fe42af6b13c68b81 (diff) | |
download | ceph-687fe888b32ac9d41595348dfc82111c8dbf2fcb.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>
-rw-r--r-- | src/msg/SimpleMessenger.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index 0a3b33860af..afee0952630 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -561,6 +561,18 @@ 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(); + ConnectionRef con = p->connection_state; + if (con && con->clear_pipe(p)) + dispatch_queue.queue_reset(con.get()); + 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; |