mon: mark_down session by con, not addr

We have the ConnectionRef here; use it.  This avoids generating a spurious
RESET event for the connection.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-07-18 14:46:57 -07:00
parent 3c81475be2
commit e0067a85d1

View File

@ -3477,16 +3477,16 @@ void Monitor::tick()
continue;
if (!s->until.is_zero() && s->until < now) {
dout(10) << " trimming session " << s->inst
dout(10) << " trimming session " << s->con << " " << s->inst
<< " (until " << s->until << " < now " << now << ")" << dendl;
messenger->mark_down(s->inst.addr);
messenger->mark_down(s->con);
remove_session(s);
} else if (!exited_quorum.is_zero()) {
if (now > (exited_quorum + 2 * g_conf->mon_lease)) {
// boot the client Session because we've taken too long getting back in
dout(10) << " trimming session " << s->inst
<< " because we've been out of quorum too long" << dendl;
messenger->mark_down(s->inst.addr);
dout(10) << " trimming session " << s->con << " " << s->inst
<< " because we've been out of quorum too long" << dendl;
messenger->mark_down(s->con);
remove_session(s);
}
}