Making an allowance for lossy server connections is silly. Just don't
ask for the Connection in that case. (There aren't any users who
rely on the previous behavior.)
Document that requirement in Messenger.h!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
virtual void mark_disposable(Connection *con) = 0;
virtual void mark_down_all() = 0;
+ /**
+ * Get the Connection object associated with a given entity. If a
+ * Connection does not exist, create one and establish a logical connection.
+ *
+ * @param dest The entity to get a connection for.
+ */
virtual Connection *get_connection(const entity_inst_t& dest) = 0;
virtual int rebind(int avoid_port) { return -EOPNOTSUPP; }
}
}
if (!pipe) {
- Policy& policy = get_policy(dest.name.type());
- if (policy.lossy && policy.server)
- pipe = NULL;
- else
- pipe = connect_rank(dest.addr, dest.name.type());
+ pipe = connect_rank(dest.addr, dest.name.type());
}
}
- if (pipe)
- return (Connection *)pipe->connection_state->get();
- return NULL;
+ return (Connection *)pipe->connection_state->get();
}