crimson: pass real connection in OpsExecuter::do_op_watch_subop_watch()

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
Radoslaw Zarzynski 2019-12-11 10:13:12 +01:00
parent 11d678ac7d
commit 61ea32441d

View File

@ -131,10 +131,12 @@ OpsExecuter::watch_errorator::future<> OpsExecuter::do_op_watch_subop_watch(
{
struct connect_ctx_t {
ObjectContext::watch_key_t key;
crimson::net::ConnectionRef conn;
watch_info_t info;
connect_ctx_t(const OSDOp& osd_op, const MOSDOp& msg)
: key(osd_op.op.watch.cookie, msg.get_reqid().name),
conn(msg.get_connection()),
info(create_watch_info(osd_op, msg)) {
}
};
@ -159,7 +161,7 @@ OpsExecuter::watch_errorator::future<> OpsExecuter::do_op_watch_subop_watch(
} else {
logger().info("op_effect: found existing watcher: {}", ctx.key);
}
return it->second->connect(nullptr /* conn */, true /* will_ping */);
return it->second->connect(std::move(ctx.conn), true /* will_ping */);
});
}