// open
connect_seq = connect.connect_seq + 1;
peer_global_seq = connect.global_seq;
+ assert(state == STATE_ACCEPTING);
state = STATE_OPEN;
ldout(msgr->cct,10) << "accept success, connect_seq = " << connect_seq << ", sending READY" << dendl;
// ok!
if (msgr->dispatch_queue.stop)
goto shutting_down;
+ inr removed = msgr->accepting_pipes.erase(this);
+ assert(removed == 1);
register_pipe();
msgr->lock.Unlock();
msgr->rank_pipe.erase(p);
} else {
ldout(msgr->cct,10) << "unregister_pipe - not registered" << dendl;
+ msgr->accepting_pipes.erase(this); // somewhat overkill, but safe.
}
}
* invalid and can be replaced by anyone holding the msgr lock
*/
hash_map<entity_addr_t, Pipe*> rank_pipe;
+ /**
+ * list of pipes are in teh process of accepting
+ *
+ * These are not yet in the rank_pipe map.
+ */
+ set<Pipe*> accepting_pipes;
/// a set of all the Pipes we have which are somehow active
set<Pipe*> pipes;
/// a list of Pipes we want to tear down