This ensures that eagerly reconnecting clients get set to OPEN
when we replay their session from the journal.
return 0;
}
Session* get_or_add_open_session(entity_inst_t i) {
+ Session *s;
if (session_map.count(i.name))
- return session_map[i.name];
- Session *s = session_map[i.name] = new Session;
+ s = session_map[i.name];
+ else
+ s = session_map[i.name] = new Session;
s->inst = i;
set_state(s, Session::STATE_OPEN);
s->last_cap_renew = g_clock.now();