aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2020-10-28 10:09:10 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-10-29 14:10:24 +0000
commit7a4aa146187cc60d2df66333b3e7dd5a5176f793 (patch)
treef83c8e955607232e7ff7c1d98a85375ec8509ae3 /server-client.c
parent977cf3cf697153c827724988db9e715cf4af2a67 (diff)
downloadrtmux-7a4aa146187cc60d2df66333b3e7dd5a5176f793.tar.gz
rtmux-7a4aa146187cc60d2df66333b3e7dd5a5176f793.tar.bz2
rtmux-7a4aa146187cc60d2df66333b3e7dd5a5176f793.zip
Do not require that there be no other clients before loading the config,
being the first client is enough. GitHub issue 2438.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/server-client.c b/server-client.c
index 5749ba94..e9587e4c 100644
--- a/server-client.c
+++ b/server-client.c
@@ -2237,7 +2237,7 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg)
c->fd = open(c->ttyname, O_RDWR|O_NOCTTY);
#endif
- if (c->flags & CLIENT_CONTROL)
+ if (c->flags & CLIENT_CONTROL)
control_start(c);
else if (c->fd != -1) {
if (tty_init(&c->tty, c) != 0) {
@@ -2252,13 +2252,13 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg)
}
/*
- * If this is the first client that has finished identifying, load
- * configuration files.
+ * If this is the first client, load configuration files. Any later
+ * clients are allowed to continue with their command even if the
+ * config has not been loaded - they might have been run from inside it
*/
if ((~c->flags & CLIENT_EXIT) &&
- !cfg_finished &&
- c == TAILQ_FIRST(&clients) &&
- TAILQ_NEXT(c, entry) == NULL)
+ !cfg_finished &&
+ c == TAILQ_FIRST(&clients))
start_cfg();
}