stop the accepter and mark all pipes down before rebind to avoid race
Fixes: #6992
Signed-off-by: Xihui He xihuihe@gmail.com
{
ldout(msgr->cct,1) << "accepter.rebind avoid " << avoid_ports << dendl;
- stop();
-
// invalidate our previously learned address.
msgr->unlearn_addr();
{
ldout(cct,1) << "rebind avoid " << avoid_ports << dendl;
assert(did_bind);
- int r = accepter.rebind(avoid_ports);
+ accepter.stop();
mark_down_all();
- return r;
+ return accepter.rebind(avoid_ports);
}
int SimpleMessenger::start()