diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 08:14:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 08:14:42 +0000 |
commit | 6963f5f48ed68cb42b92e40c84014bd12cd377fc (patch) | |
tree | c2abdd80665f8494280a65417a9c21156ff41125 /src/protocol.c | |
parent | Adding upstream version 1.7.3. (diff) | |
download | ttyd-6963f5f48ed68cb42b92e40c84014bd12cd377fc.tar.xz ttyd-6963f5f48ed68cb42b92e40c84014bd12cd377fc.zip |
Adding upstream version 1.7.7.upstream/1.7.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/protocol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol.c b/src/protocol.c index cc0945b..53e65d4 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -306,7 +306,7 @@ int callback_tty(struct lws *wsi, enum lws_callback_reasons reason, void *user, switch (command) { case INPUT: - if (server->readonly) break; + if (!server->writable) break; int err = pty_write(pss->process, pty_buf_init(pss->buffer + 1, pss->len - 1)); if (err) { lwsl_err("uv_write: %s (%s)\n", uv_err_name(err), uv_strerror(err)); @@ -379,8 +379,8 @@ int callback_tty(struct lws *wsi, enum lws_callback_reasons reason, void *user, } } - if (server->once && server->client_count == 0) { - lwsl_notice("exiting due to the --once option.\n"); + if ((server->once || server->exit_no_conn) && server->client_count == 0) { + lwsl_notice("exiting due to the --once/--exit-no-conn option.\n"); force_exit = true; lws_cancel_service(context); exit(0); |