mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-02 07:20:51 +00:00
Error recovery for network & member stream watchers
This commit is contained in:
parent
0f17508cac
commit
8b8399efbc
@ -735,6 +735,7 @@ void PostgreSQL::_membersWatcher_Redis() {
|
|||||||
std::string key = "member-stream:{" + std::string(_myAddress.toString(buf)) + "}";
|
std::string key = "member-stream:{" + std::string(_myAddress.toString(buf)) + "}";
|
||||||
|
|
||||||
while (_run == 1) {
|
while (_run == 1) {
|
||||||
|
try {
|
||||||
json tmp;
|
json tmp;
|
||||||
std::unordered_map<std::string, ItemStream> result;
|
std::unordered_map<std::string, ItemStream> result;
|
||||||
if (_rc->clusterMode) {
|
if (_rc->clusterMode) {
|
||||||
@ -780,6 +781,9 @@ void PostgreSQL::_membersWatcher_Redis() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (sw::redis::Error &e) {
|
||||||
|
fprintf(stderr, "Error in Redis members watcher: %s\n", e.what());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr, "membersWatcher ended\n");
|
fprintf(stderr, "membersWatcher ended\n");
|
||||||
}
|
}
|
||||||
@ -856,6 +860,7 @@ void PostgreSQL::_networksWatcher_Redis() {
|
|||||||
std::string key = "network-stream:{" + std::string(_myAddress.toString(buf)) + "}";
|
std::string key = "network-stream:{" + std::string(_myAddress.toString(buf)) + "}";
|
||||||
|
|
||||||
while (_run == 1) {
|
while (_run == 1) {
|
||||||
|
try {
|
||||||
json tmp;
|
json tmp;
|
||||||
std::unordered_map<std::string, ItemStream> result;
|
std::unordered_map<std::string, ItemStream> result;
|
||||||
if (_rc->clusterMode) {
|
if (_rc->clusterMode) {
|
||||||
@ -902,6 +907,9 @@ void PostgreSQL::_networksWatcher_Redis() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (sw::redis::Error &e) {
|
||||||
|
fprintf(stderr, "Error in Redis networks watcher: %s\n", e.what());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr, "networksWatcher ended\n");
|
fprintf(stderr, "networksWatcher ended\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user