msg/SimpleMessenger: start accepter in ready()

Start the accepter thread when the first dispatcher is ready.  This ensures
that there will be someone around to verify authorizers for incoming
connections, and means we have a bit less failure noise on the monitors
as a result.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-10-30 13:19:30 -07:00
parent c830a9b241
commit 184a676e64

View File

@ -73,6 +73,11 @@ void SimpleMessenger::ready()
{
ldout(cct,10) << "ready " << get_myaddr() << dendl;
dispatch_queue.start();
lock.Lock();
if (did_bind)
accepter.start();
lock.Unlock();
}
@ -287,9 +292,6 @@ int SimpleMessenger::start()
lock.Unlock();
if (did_bind)
accepter.start();
reaper_started = true;
reaper_thread.create();
return 0;