summaryrefslogtreecommitdiff
path: root/src/core/servers-reconnect.c
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-03-19 16:06:46 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2018-03-29 23:24:13 +0200
commitc08685a1a3e4a719fcfe8f30a338a91db8c3b8d1 (patch)
treea7a81f27fe609db01050b4d39aee96db2905e2c5 /src/core/servers-reconnect.c
parent9fa8c32b9e2f80e308d1ed780490f6d2dfd6bb05 (diff)
downloadirssi-c08685a1a3e4a719fcfe8f30a338a91db8c3b8d1.zip
also reconnect lookup_servers
Diffstat (limited to 'src/core/servers-reconnect.c')
-rw-r--r--src/core/servers-reconnect.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c
index 1727704c..5f609cf5 100644
--- a/src/core/servers-reconnect.c
+++ b/src/core/servers-reconnect.c
@@ -111,6 +111,21 @@ static int server_reconnect_timeout(void)
}
}
+ for (tmp = lookup_servers; tmp != NULL; tmp = next) {
+ SERVER_REC *server = tmp->data;
+
+ next = tmp->next;
+ if (server->connect_time + connect_timeout < now &&
+ connect_timeout > 0) {
+ if (server->connect_tag != -1) {
+ g_source_remove(server->connect_tag);
+ server->connect_tag = -1;
+ }
+ server->connection_lost = TRUE;
+ server_connect_failed(server, "Timeout");
+ }
+ }
+
/* If server_connect() removes the next reconnection in queue,
we're screwed. I don't think this should happen anymore, but just
to be sure we don't crash, do this safely. */