If we are shutting down all old connections and binding to new ports,
we want to avoid a sequence like:
- close all prevoius connections
- new connection comes in on old port
- rebind to new ports
-> connection from old port leaks through
As a first step, close all connections after we shut down the old
accepter and before we start the new one.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
07a0860a1899c7353bb506e33de72fdd22b857dd)
Conflicts:
src/msg/SimpleMessenger.cc
int SimpleMessenger::rebind(int avoid_port)
{
ldout(cct,1) << "rebind avoid " << avoid_port << dendl;
- mark_down_all();
assert(did_bind);
- return accepter.rebind(avoid_port);
+ int r = accepter.rebind(avoid_port);
+ mark_down_all();
+ return r;
}
int SimpleMessenger::start()