This fixes a problem where:
- pipe faults, con->pipe is cleared
- ms_handle_reset tries to mark_down, but it doesn't know the pipe
Signed-off-by: Sage Weil <sage@inktank.com>
stop();
+ // ugh
+ pipe_lock.Unlock();
+ msgr->lock.Lock();
+ pipe_lock.Lock();
+ unregister_pipe();
+ msgr->lock.Unlock();
+
+ in_q->discard_queue();
+ discard_queue();
+
// disconnect from Connection, and mark it failed. future messages
// will be dropped.
assert(connection_state);
connection_state->clear_pipe(this);
- in_q->discard_queue();
- discard_queue();
-
msgr->dispatch_queue.queue_reset(connection_state);
return;
}