summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Viennot <nicolas@viennot.biz>2019-09-18 23:35:07 -0400
committerNicolas Viennot <nicolas@viennot.biz>2019-09-18 23:35:07 -0400
commitd654ff22194bde5fc6e02b2f93ae55cb69c4ddcc (patch)
treed559b16819d4460971fecb44913759849239f338
parent3e5d919b14e8f5c6aa703e45092247c4a737194e (diff)
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.
-rw-r--r--server.c4
-rw-r--r--tmate-session.c1
2 files changed, 1 insertions, 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();
}