mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
msgr: queue reset when marking down pipes on shutdown
This lets the callbacks clean up ref cycles. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
ea6880f8a2
commit
597e4398b5
@ -83,8 +83,8 @@ void SimpleMessenger::ready()
|
||||
int SimpleMessenger::shutdown()
|
||||
{
|
||||
ldout(cct,10) << "shutdown " << get_myaddr() << dendl;
|
||||
dispatch_queue.shutdown();
|
||||
mark_down_all();
|
||||
dispatch_queue.shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -562,7 +562,10 @@ void SimpleMessenger::mark_down_all()
|
||||
p->unregister_pipe();
|
||||
p->pipe_lock.Lock();
|
||||
p->stop();
|
||||
ConnectionRef con = p->connection_state;
|
||||
p->pipe_lock.Unlock();
|
||||
if (con && con->clear_pipe(p))
|
||||
dispatch_queue.queue_reset(con.get());
|
||||
}
|
||||
lock.Unlock();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user