// Check the authorizer. If not good, bail out.
- if (!msgr->verify_authorizer(connection_state, peer_type, connect.authorizer_protocol, authorizer,
+ pipe_lock.Unlock();
+
+ if (!msgr->verify_authorizer(connection_state, peer_type, connect.authorizer_protocol, authorizer,
authorizer_reply, authorizer_valid, session_key) ||
!authorizer_valid) {
ldout(msgr->cct,0) << "accept: got bad authorizer" << dendl;
+ pipe_lock.Lock();
+ if (state != STATE_ACCEPTING)
+ goto shutting_down_msgr_unlocked;
reply.tag = CEPH_MSGR_TAG_BADAUTHORIZER;
delete session_security;
session_security = NULL;
ldout(msgr->cct,10) << "accept: setting up session_security." << dendl;
- pipe_lock.Unlock();
msgr->lock.Lock();
pipe_lock.Lock();
if (msgr->dispatch_queue.stop)
return -1;
shutting_down:
- assert(pipe_lock.is_locked());
msgr->lock.Unlock();
+ shutting_down_msgr_unlocked:
+ assert(pipe_lock.is_locked());
if (msgr->cct->_conf->ms_inject_internal_delays) {
ldout(msgr->cct, 10) << " sleep for " << msgr->cct->_conf->ms_inject_internal_delays << dendl;