diff options
Diffstat (limited to '')
-rw-r--r-- | src/server.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c index f9113af..c135ab9 100644 --- a/src/server.c +++ b/src/server.c @@ -437,13 +437,12 @@ int main(int argc, char **argv) { #if LWS_LIBRARY_VERSION_NUMBER >= 4000000 case 'P': { int interval = parse_int("ping-interval", optarg); - if (interval <= 0) { + if (interval < 0) { fprintf(stderr, "ttyd: invalid ping interval: %s\n", optarg); return -1; } retry.secs_since_valid_ping = interval; retry.secs_since_valid_hangup = interval + 7; - info.retry_and_idle_policy = &retry; } break; #endif case '6': @@ -511,6 +510,8 @@ int main(int argc, char **argv) { #if LWS_LIBRARY_VERSION_NUMBER < 4000000 info.ws_ping_pong_interval = 5; +#else + info.retry_and_idle_policy = &retry; #endif if (strlen(iface) > 0) { @@ -531,6 +532,9 @@ int main(int argc, char **argv) { if (ssl) { info.ssl_cert_filepath = cert_path; info.ssl_private_key_filepath = key_path; + #ifndef LWS_WITH_MBEDTLS + info.ssl_options_set = SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1; + #endif if (strlen(ca_path) > 0) { info.ssl_ca_filepath = ca_path; info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT; |