If we get a reset during shutdown, we should still break the cycle to avoid
tripping the valgrind leak detection. Note that we are touching no
internal Monitor state here and the locking has not changed.
Signed-off-by: Sage Weil <sage@inktank.com>
{
dout(10) << "ms_handle_reset " << con << " " << con->get_peer_addr() << dendl;
- if (is_shutdown())
- return false;
-
// ignore lossless monitor sessions
if (con->get_peer_type() == CEPH_ENTITY_TYPE_MON)
return false;
if (!s)
return false;
+ // break any con <-> session ref cycle
+ s->con->set_priv(NULL);
+
+ if (is_shutdown())
+ return false;
+
Mutex::Locker l(lock);
dout(10) << "reset/close on session " << s->inst << dendl;