From 816351d37102f9f31d84b9fc335308c967fdbb0a Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 29 Jul 2014 15:40:51 +0100 Subject: [PATCH] Set auto reconnect to 30 seconds by default fixes #386 --- src/config/preferences.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config/preferences.c b/src/config/preferences.c index 6ac9a6d6..1f7f2fd1 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -252,7 +252,11 @@ prefs_get_priority(void) gint prefs_get_reconnect(void) { - return g_key_file_get_integer(prefs, PREF_GROUP_CONNECTION, "reconnect", NULL); + if (!g_key_file_has_key(prefs, PREF_GROUP_CONNECTION, "reconnect", NULL)) { + return 30; + } else { + return g_key_file_get_integer(prefs, PREF_GROUP_CONNECTION, "reconnect", NULL); + } } void