summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-05-03 00:04:09 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-05-03 00:13:36 +0200
commitb31104784cbb6f88f144289c90340d95f1c849e5 (patch)
treeb5a0966d93eb99b32afd29a7116f5f6b77484314
parent6d0fff6a71ab6d5d495d612a54f820c1421201e1 (diff)
downloadxK-b31104784cbb6f88f144289c90340d95f1c849e5.tar.gz
xK-b31104784cbb6f88f144289c90340d95f1c849e5.tar.xz
xK-b31104784cbb6f88f144289c90340d95f1c849e5.zip
degesch: connect _after_ starting the UI
-rw-r--r--degesch.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/degesch.c b/degesch.c
index ffb8625..0f703cc 100644
--- a/degesch.c
+++ b/degesch.c
@@ -4306,6 +4306,7 @@ end:
static bool
irc_connect (struct server *s, struct error **e)
{
+ // TODO: connect asynchronously so that we don't freeze
struct app_context *ctx = s->ctx;
const char *irc_host = get_config_string (ctx, "server.irc_host");
@@ -4747,14 +4748,8 @@ main (int argc, char *argv[])
ctx.current_buffer = ctx.server.buffer;
refresh_prompt (&ctx);
- // TODO: connect asynchronously (first step towards multiple servers)
- struct error *e = NULL;
- if (!irc_connect (&ctx.server, &e))
- {
- buffer_send_error (&ctx, ctx.server.buffer, "%s", e->message);
- error_free (e);
- exit (EXIT_FAILURE);
- }
+ // Connect to the server ASAP
+ poller_timer_set (&ctx.server.reconnect_tmr, 0);
rl_startup_hook = init_readline;
rl_catch_sigwinch = false;