summaryrefslogtreecommitdiff
path: root/server-proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'server-proxy.c')
-rw-r--r--server-proxy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server-proxy.c b/server-proxy.c
index 60f4b33..2e8bbd5 100644
--- a/server-proxy.c
+++ b/server-proxy.c
@@ -381,6 +381,10 @@ proxy_new(struct server *server, struct saddr *client, int fd)
uring_task_set_buf(&proxy->servertask, &proxy->serverbuf);
list_add(&proxy->list, &server->proxys);
+ if (server->state != SERVER_STATE_RUNNING) {
+ /* FIXME: We need to wait for the server to start */
+ server_start(server);
+ }
connect_any(&proxy->servertask, &server->remotes,
&proxy->server_conn, proxy_connected_cb);