libnm,vpn-service-plugin: remove old connect timer when adding new one

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
This commit is contained in:
Lubomir Rintel
2015-10-22 14:27:45 +02:00
parent 842889bc5b
commit a5feb44a44

View File

@@ -424,6 +424,7 @@ connect_timer_start (NMVpnServicePlugin *plugin)
{
NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE (plugin);
nm_clear_g_source (&priv->connect_timer);
priv->connect_timer = g_timeout_add_seconds (60, connect_timer_expired, plugin);
}