Skip to content

Commit

Permalink
Merge PR ceph#44337 into master
Browse files Browse the repository at this point in the history
* refs/pull/44337/head:
	mon: prevent new sessions during shutdown

Reviewed-by: Patrick Donnelly <[email protected]>
  • Loading branch information
liewegas committed Dec 17, 2021
2 parents aa98a82 + c98b268 commit b55781d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6443,12 +6443,17 @@ void Monitor::ms_handle_accept(Connection *con)
dout(10) << __func__ << " con " << con << " session " << s
<< " already on list" << dendl;
} else {
std::lock_guard l(session_map_lock);
if (state == STATE_SHUTDOWN) {
dout(10) << __func__ << " ignoring new con " << con << " (shutdown)" << dendl;
con->mark_down();
return;
}
dout(10) << __func__ << " con " << con << " session " << s
<< " registering session for "
<< con->get_peer_addrs() << dendl;
s->_ident(entity_name_t(con->get_peer_type(), con->get_peer_id()),
con->get_peer_addrs());
std::lock_guard l(session_map_lock);
session_map.add_session(s);
}
}
Expand Down

0 comments on commit b55781d

Please sign in to comment.