libnm-glib,vpn-plugin: remove old connect timer when adding new one
authorLubomir Rintel <lkundrak@v3.sk>
Thu, 22 Oct 2015 12:27:45 +0000 (14:27 +0200)
committerLubomir Rintel <lkundrak@v3.sk>
Fri, 23 Oct 2015 16:24:07 +0000 (18:24 +0200)
If the plugin didn't succeed connecting once, don't let the old timer fire
during a subsequent connection.

https://bugzilla.redhat.com/show_bug.cgi?id=1271973

libnm-glib/nm-vpn-plugin.c

index 0894fa9..d180ec4 100644 (file)
@@ -426,6 +426,7 @@ connect_timer_start (NMVPNPlugin *plugin)
 {
        NMVPNPluginPrivate *priv = NM_VPN_PLUGIN_GET_PRIVATE (plugin);
 
+       nm_clear_g_source (&priv->connect_timer);
        priv->connect_timer = g_timeout_add_seconds (60, connect_timer_expired, plugin);
 }