1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

also reconnect lookup_servers

This commit is contained in:
ailin-nemui 2018-03-19 16:06:46 +01:00
parent 9fa8c32b9e
commit c08685a1a3
2 changed files with 16 additions and 0 deletions

View File

@ -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, /* If server_connect() removes the next reconnection in queue,
we're screwed. I don't think this should happen anymore, but just we're screwed. I don't think this should happen anymore, but just
to be sure we don't crash, do this safely. */ to be sure we don't crash, do this safely. */

View File

@ -426,6 +426,7 @@ int server_start_connect(SERVER_REC *server)
server_connect_callback_readpipe, server_connect_callback_readpipe,
server); server);
server->connect_time = time(NULL);
lookup_servers = g_slist_append(lookup_servers, server); lookup_servers = g_slist_append(lookup_servers, server);
signal_emit("server looking", 1, server); signal_emit("server looking", 1, server);