mirror of
https://github.com/tsl0922/ttyd.git
synced 2026-01-01 00:14:23 +01:00
server: allow reconnect to be 0
This commit is contained in:
@@ -331,7 +331,7 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
case 'r':
|
||||
server->reconnect = atoi(optarg);
|
||||
if (server->reconnect <= 0) {
|
||||
if (server->reconnect < 0) {
|
||||
fprintf(stderr, "ttyd: invalid reconnect: %s\n", optarg);
|
||||
return -1;
|
||||
}
|
||||
@@ -448,7 +448,9 @@ main(int argc, char **argv) {
|
||||
lwsl_notice(" start command: %s\n", server->command);
|
||||
lwsl_notice(" close signal: %s (%d)\n", server->sig_name, server->sig_code);
|
||||
lwsl_notice(" terminal type: %s\n", server->terminal_type);
|
||||
lwsl_notice(" reconnect timeout: %ds\n", server->reconnect);
|
||||
if (server->reconnect > 0) {
|
||||
lwsl_notice(" reconnect timeout: %ds\n", server->reconnect);
|
||||
}
|
||||
if (server->check_origin)
|
||||
lwsl_notice(" check origin: true\n");
|
||||
if (server->url_arg)
|
||||
|
||||
Reference in New Issue
Block a user