Observed a segfault in rebind -> mark_down_all -> clear_pipe -> put that
may have been due to a racing thread clearing the connection_state pointer.
Do the clear_pipe() call under the protection of pipe_lock, as we do in
all other contexts.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
5fc1dabfb3b2cbffdee3214d24d7769d6e440e45)
Conflicts:
src/msg/SimpleMessenger.cc
p->unregister_pipe();
p->pipe_lock.Lock();
p->stop();
+ if (p->connection_state)
+ p->connection_state->clear_pipe(p);
p->pipe_lock.Unlock();
}
lock.Unlock();