Signed-off-by: Sage Weil <sage@newdream.net>
virtual int send_keepalive(const entity_inst_t& dest) = 0;
virtual void mark_down(const entity_addr_t& a) = 0;
+ virtual void mark_down(Connection *con) = 0;
virtual Connection *get_connection(const entity_inst_t& dest) = 0;
lock.Unlock();
}
+void SimpleMessenger::mark_down(Connection *con)
+{
+ lock.Lock();
+ Pipe *p = (Pipe *)con->get_pipe();
+ if (p) {
+ dout(1) << "mark_down " << con << " -- " << p << dendl;
+ p->unregister_pipe();
+ p->pipe_lock.Lock();
+ p->stop();
+ p->pipe_lock.Unlock();
+ p->put();
+ } else {
+ dout(1) << "mark_down " << con << " -- pipe dne" << dendl;
+ }
+ lock.Unlock();
+}
+
void SimpleMessenger::learned_addr(entity_addr_t peer_addr_for_me)
{
lock.Lock();
const entity_addr_t &get_ms_addr() { return ms_addr; }
void mark_down(const entity_addr_t& addr);
+ void mark_down(Connection *con);
void mark_down_all();
// reaper