summaryrefslogtreecommitdiff
path: root/gdhcp/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdhcp/client.c')
-rw-r--r--gdhcp/client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c
index 4a873bf9..0cf39cd7 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -944,6 +944,9 @@ static gboolean start_renew_timeout(gpointer user_data)
else {
send_renew(dhcp_client);
+ if (dhcp_client->timeout > 0)
+ g_source_remove(dhcp_client->timeout);
+
dhcp_client->timeout =
g_timeout_add_seconds_full(G_PRIORITY_HIGH,
dhcp_client->lease_seconds >> 1,
@@ -961,6 +964,9 @@ static void start_bound(GDHCPClient *dhcp_client)
dhcp_client->state = BOUND;
+ if (dhcp_client->timeout > 0)
+ g_source_remove(dhcp_client->timeout);
+
dhcp_client->timeout = g_timeout_add_seconds_full(G_PRIORITY_HIGH,
dhcp_client->lease_seconds >> 1,
start_renew_timeout, dhcp_client,