monclient: avoid dup subscribe messages

This commit is contained in:
Sage Weil 2009-09-22 09:58:07 -07:00
parent d8c8da8649
commit 88fd161523

View File

@ -368,15 +368,16 @@ void MonClient::_renew_subs()
}
dout(10) << "renew_subs" << dendl;
if (sub_renew_sent == utime_t())
sub_renew_sent = g_clock.now();
MMonSubscribe *m = new MMonSubscribe;
m->what = sub_have;
if (cur_mon < 0)
_reopen_session();
_send_mon_message(m);
else {
if (sub_renew_sent == utime_t())
sub_renew_sent = g_clock.now();
MMonSubscribe *m = new MMonSubscribe;
m->what = sub_have;
_send_mon_message(m);
}
}
void MonClient::handle_subscribe_ack(MMonSubscribeAck *m)