Merge pull request #1016 from bydsky/bugfix

Fix Issue #6992: stop the accepter and mark all pipes down before rebind

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-12-31 08:18:15 -08:00
commit d77101ccf8
2 changed files with 2 additions and 4 deletions

View File

@ -155,8 +155,6 @@ int Accepter::rebind(const set<int>& avoid_ports)
{
ldout(msgr->cct,1) << "accepter.rebind avoid " << avoid_ports << dendl;
stop();
// invalidate our previously learned address.
msgr->unlearn_addr();

View File

@ -278,9 +278,9 @@ int SimpleMessenger::rebind(const set<int>& avoid_ports)
{
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()