X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/06282fd37814c4a9d53bca089b048709b368f5b3..869c0cc91d8f6b2bb80026616372d16450b64d9f:/config.cc diff --git a/config.cc b/config.cc index 4931a9f..a177362 100644 --- a/config.cc +++ b/config.cc @@ -1,5 +1,4 @@ #include "config.h" -#include "handle.h" using std::vector; @@ -85,7 +84,7 @@ void config::paxos_commit(unsigned instance, const string & value) { LOG << "is " << mem << " still a member?"; if (!isamember(mem, newmem) && me != mem) { LOG << "delete " << mem; - handle(mem).invalidate(); + rpcc::unbind_cached(mem); } } @@ -198,11 +197,10 @@ config::heartbeat_t config::doheartbeat(const string & m, lock & cfg_mutex_lock) VERIFY(cfg_mutex_lock); unsigned vid = my_view_id; LOG << "heartbeat to " << m << " (" << vid << ")"; - handle h(m); cfg_mutex_lock.unlock(); int r = 0, ret = rpc_protocol::bind_failure; - if (rpcc *cl = h.safebind()) + if (auto cl = rpcc::bind_cached(m)) ret = cl->call_timeout(paxos_protocol::heartbeat, milliseconds(100), r, me, vid); cfg_mutex_lock.lock(); @@ -212,7 +210,7 @@ config::heartbeat_t config::doheartbeat(const string & m, lock & cfg_mutex_lock) break; case rpc_protocol::atmostonce_failure: case rpc_protocol::oldsrv_failure: - h.invalidate(); + rpcc::unbind_cached(m); break; default: LOG << "problem with " << m << " (" << ret << ") my vid " << vid << " his vid " << r;