mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-15 13:48:16 +00:00
don't crash out of the controller heartbeat loop here
This commit is contained in:
@ -1014,6 +1014,7 @@ void PostgreSQL::heartbeat()
|
|||||||
}
|
}
|
||||||
_pool->unborrow(c);
|
_pool->unborrow(c);
|
||||||
|
|
||||||
|
try {
|
||||||
if (_redisMemberStatus) {
|
if (_redisMemberStatus) {
|
||||||
if (_rc->clusterMode) {
|
if (_rc->clusterMode) {
|
||||||
_cluster->zadd("controllers", "controllerId", ts);
|
_cluster->zadd("controllers", "controllerId", ts);
|
||||||
@ -1021,6 +1022,9 @@ void PostgreSQL::heartbeat()
|
|||||||
_redis->zadd("controllers", "controllerId", ts);
|
_redis->zadd("controllers", "controllerId", ts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (sw::redis::Error &e) {
|
||||||
|
fprintf(stderr, "ERROR: Redis error in heartbeat thread: %s\n", e.what());
|
||||||
|
}
|
||||||
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user