summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/degesch.c b/degesch.c
index 93ee71a..b4a1384 100644
--- a/degesch.c
+++ b/degesch.c
@@ -1538,6 +1538,10 @@ static struct config_schema g_config_server[] =
.comment = "OpenSSL CA bundle path",
.type = CONFIG_ITEM_STRING },
+ { .name = "autoconnect",
+ .comment = "Connect automatically on startup",
+ .type = CONFIG_ITEM_BOOLEAN,
+ .default_ = "on" },
{ .name = "autojoin",
.comment = "Channels to join on start",
.type = CONFIG_ITEM_STRING_ARRAY,
@@ -6451,9 +6455,9 @@ server_add (struct app_context *ctx,
config_schema_apply_to_object (g_config_server, subtree, s);
config_schema_call_changed (subtree);
- // Connect to the server ASAP
- // TODO: make this configurable ("autoconnect")
- poller_timer_set (&s->reconnect_tmr, 0);
+ if (get_config_boolean (s->config, "autoconnect"))
+ // Connect to the server ASAP
+ poller_timer_set (&s->reconnect_tmr, 0);
return s;
}