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>
p->pipe_lock.Lock();
p->stop();
ConnectionRef con = p->connection_state;
- p->pipe_lock.Unlock();
if (con && con->clear_pipe(p))
dispatch_queue.queue_reset(con.get());
+ p->pipe_lock.Unlock();
}
lock.Unlock();
}