{
bool ret = true;
- if (state == STATE_SHUTDOWN) {
+ if (is_shutdown()) {
m->put();
return true;
}
{
dout(10) << "ms_handle_reset " << con << " " << con->get_peer_addr() << dendl;
- if (state == STATE_SHUTDOWN)
+ if (is_shutdown())
return false;
// ignore lossless monitor sessions
{
dout(10) << "ms_get_authorizer for " << ceph_entity_type_name(service_id) << dendl;
- if (state == STATE_SHUTDOWN)
+ if (is_shutdown())
return false;
// we only connect to other monitors; every else connects to us.
<< " " << ceph_entity_type_name(peer_type)
<< " protocol " << protocol << dendl;
- if (state == STATE_SHUTDOWN)
+ if (is_shutdown())
return false;
if (peer_type == CEPH_ENTITY_TYPE_MON &&
return sn;
}
+ bool is_shutdown() const { return state == STATE_SHUTDOWN; }
bool is_probing() const { return state == STATE_PROBING; }
bool is_synchronizing() const { return state == STATE_SYNCHRONIZING; }
bool is_electing() const { return state == STATE_ELECTING; }