about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-07-29 15:40:51 +0100
committerJames Booth <boothj5@gmail.com>2014-07-29 15:40:51 +0100
commit816351d37102f9f31d84b9fc335308c967fdbb0a (patch)
tree9b6cb9c7cdd3f0d4e8c0cb8dc1ce758793ebe886 /src/config
parent9123675c9c203fcf21f86ec49043fa58d63bea5e (diff)
downloadprofani-tty-816351d37102f9f31d84b9fc335308c967fdbb0a.tar.gz
Set auto reconnect to 30 seconds by default
fixes #386
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c6
1 files changed, 5 insertions, 1 deletions
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