Update 0001-tunneldigger-client-reset_broken_brokers.patch

This commit is contained in:
Claus Marxmeier 2019-03-27 13:45:26 +01:00 committed by GitHub
parent d2219189d1
commit ea92d0ac77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -25,15 +25,20 @@ index 16fdf3c..69ce54c 100644
// Perform broker processing for 10 seconds or until all brokers are ready
// (whichever is shorter); since all contexts are in standby mode, all
@@ -1476,6 +1467,11 @@ int main(int argc, char **argv)
@@ -1474,8 +1465,14 @@ int main(int argc, char **argv)
i = select_broker(brokers, broker_cnt, ready_cnt);
if (i == -1) {
syslog(LOG_ERR, "No suitable brokers found. Retrying in 5 seconds");
- syslog(LOG_ERR, "No suitable brokers found. Retrying in 5 seconds");
+ syslog(LOG_ERR, "No suitable brokers found. Retrying in 5 seconds.");
sleep(5);
+ // Un-break all brokers. There is no point in avoiding bad brokers if that means
+ // we have no candidates left.
+ syslog(LOG_ERR, "Resetting status of brokers and starting from scratch.");
+ for (i = 0; i < broker_cnt; i++) {
+ brokers[i].broken = 0;
+ }
continue;
}