From d654ff22194bde5fc6e02b2f93ae55cb69c4ddcc Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Wed, 18 Sep 2019 23:35:07 -0400 Subject: [PATCH] Send TMATE_READY message when the config files are done loading This fixes bug where webhooks are not registering correctly, leading to a disconnect and reconnect. --- server.c | 4 ---- tmate-session.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/server.c b/server.c index 81334f1e..a2378959 100644 --- a/server.c +++ b/server.c @@ -205,10 +205,6 @@ server_start(struct event_base *base, int lockfd, char *lockfile) status_prompt_load_history(); -#ifdef TMATE - tmate_write_ready(); -#endif - server_add_accept(0); proc_loop(server_proc, server_loop); diff --git a/tmate-session.c b/tmate-session.c index 8d647203..106687e1 100644 --- a/tmate-session.c +++ b/tmate-session.c @@ -138,6 +138,7 @@ void tmate_session_start(void) * - While we are parsing the config file, we need to be able to * serialize it, and so we need a worker encoder. */ + tmate_write_ready(); lookup_and_connect(); }