SharedPV separate close() and disconnect()

Previously, SharedPV::close() and StaticProvider::close()
would both disconnect all active clients, and put the SharedPV
in a closed (untyped) state.

SharedPV::close() remains unchanged.

StaticProvider::close() now only disconnects Channels created
through it, and leaves SharedPVs in the opened state.
This commit is contained in:
Michael Davidsaver
2019-07-07 16:33:13 -07:00
parent 50de6cc58e
commit aafb12f562
4 changed files with 25 additions and 8 deletions

View File

@@ -138,7 +138,7 @@ void StaticProvider::close(bool destroy)
}
}
for(Impl::builders_t::iterator it(pvs.begin()), end(pvs.end()); it!=end; ++it) {
it->second->close(destroy);
it->second->disconnect(destroy, impl.get());
}
}
@@ -168,7 +168,7 @@ std::tr1::shared_ptr<StaticProvider::ChannelBuilder> StaticProvider::remove(cons
}
}
if(ret)
ret->close(true);
ret->disconnect(true, impl.get());
return ret;
}