From 62010aafd4014c19d4d0cf36f01d3c53b43c5e7b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 10:14:45 +0200 Subject: Merging upstream version 1.7.7. Signed-off-by: Daniel Baumann --- src/protocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/protocol.c') 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); -- cgit v1.2.3