Avoid client Context leak

Keep no internal public Context refs.
This commit is contained in:
Michael Davidsaver
2020-04-10 08:49:27 -07:00
parent 20c4ff0c26
commit dd3706aa0f
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -510,7 +510,7 @@ std::shared_ptr<Subscription> MonitorBuilder::exec()
std::shared_ptr<Subscription> ret;
ctx->tcp_loop.call([&ret, this]() {
auto chan = Channel::build(ctx, _name);
auto chan = Channel::build(ctx->shared_from_this(), _name);
auto op = std::make_shared<SubscriptionImpl>(Operation::Monitor, chan);
op->event = std::move(_event);