Instead of a special-case exit, just skip the con replacement. Continue
on to mark the old con down.
CID 745920 (#1 of 1): Missing unlock (LOCK)
At (8): Returning without unlocking "this->heartbeat_lock._m".
Signed-off-by: Sage Weil <sage@inktank.com>
ConnectionRef newcon = service.get_con_osd_hb(p->second.peer, p->second.epoch);
if (!newcon) {
dout(10) << "heartbeat_reset reopen failed hb con " << con << " but failed to reopen" << dendl;
- s->put();
- return true;
+ } else {
+ dout(10) << "heartbeat_reset reopen failed hb con " << con << dendl;
+ p->second.con = newcon.get();
+ p->second.con->get();
+ p->second.con->set_priv(s);
}
- dout(10) << "heartbeat_reset reopen failed hb con " << con << dendl;
- p->second.con = newcon.get();
- p->second.con->get();
- p->second.con->set_priv(s);
} else {
dout(10) << "heartbeat_reset closing (old) failed hb con " << con << dendl;
}