Delete 0001-tunneldigger-client-reset_broken_brokers.patch

obsolete with commit 7c467e68021526b8631e8a53a9022aa223b1991c on tunneldigger
This commit is contained in:
Claus Marxmeier 2019-03-31 17:00:50 +02:00 committed by GitHub
parent b4e264d1fe
commit 353705732f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 44 deletions

View File

@ -1,44 +0,0 @@
diff --git a/client/l2tp_client.c b/client/l2tp_client.c
index 16fdf3c..69ce54c 100644
--- a/client/l2tp_client.c
+++ b/client/l2tp_client.c
@@ -1431,10 +1431,6 @@ int main(int argc, char **argv)
// Reset availability information and standby setting.
for (i = 0; i < broker_cnt; i++) {
- // Re-enable all brokers if they are all broken
- if (working_brokers == 0) {
- brokers[i].broken = 0;
- }
if (brokers[i].broken) {
// Inhibit hostname resolution and connect process.
syslog(LOG_INFO, "Not trying %s:%s again as it broke last time we tried.",
@@ -1442,11 +1438,6 @@ int main(int argc, char **argv)
brokers[i].ctx->state = STATE_FAILED;
}
}
- // Adapt working_brokers, needs updating if we re-enabled brokers
- if (working_brokers == 0) {
- syslog(LOG_INFO, "All brokers sent us an error, trying them all again.");
- working_brokers = broker_cnt;
- }
// Perform broker processing for 10 seconds or until all brokers are ready
// (whichever is shorter); since all contexts are in standby mode, all
@@ -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.");
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;
}