Reduced timeouts by 10x
[invirt/third/libt4.git] / config.cc
index 727277e..5373007 100644 (file)
--- a/config.cc
+++ b/config.cc
@@ -149,7 +149,7 @@ void config::heartbeater() [[noreturn]] {
     lock cfg_mutex_lock(cfg_mutex);
 
     while (1) {
-        auto next_timeout = steady_clock::now() + seconds(3);
+        auto next_timeout = steady_clock::now() + milliseconds(300);
         LOG("go to sleep");
         config_cond.wait_until(cfg_mutex_lock, next_timeout);
 
@@ -204,7 +204,7 @@ config::heartbeat_t config::doheartbeat(const string &m, lock &cfg_mutex_lock) {
     cfg_mutex_lock.unlock();
     int r = 0, ret = rpc_const::bind_failure;
     if (rpcc *cl = h.safebind())
-        ret = cl->call_timeout(paxos_protocol::heartbeat, rpcc::to(1000), r, me, vid);
+        ret = cl->call_timeout(paxos_protocol::heartbeat, rpcc::to(100), r, me, vid);
     cfg_mutex_lock.lock();
 
     heartbeat_t res = OK;