+ return h->client.get();
+}
+
+void handle::invalidate() {
+ {
+ lock cl(h->client_mutex);
+ h->valid = false;
+
+ LOG_NONMEMBER("cl " << h->destination << " refcnt " << h.use_count());
+ }
+ lock ml(mgr_mutex);
+ hmap.erase(h->destination);
+ h = nullptr;
+}
+
+void invalidate_handle(const string & m) {
+ lock ml(mgr_mutex);
+ if (hmap.find(m) == hmap.end()) {
+ LOG_NONMEMBER("cl " << m << " isn't in cl list");
+ return;
+ }
+
+ hmap[m]->valid = false;
+ LOG_NONMEMBER("cl " << m << " refcnt " << hmap[m].use_count());
+ hmap.erase(m);