From ff2eebc4cc72eca3208854e9a562336c0e6ec68c Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Sat, 2 May 2020 23:26:59 +0800 Subject: [PATCH] src: fix lws version check for keep alive --- src/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server.c b/src/server.c index c7ee1ef..c1e7c33 100644 --- a/src/server.c +++ b/src/server.c @@ -448,9 +448,9 @@ int main(int argc, char **argv) { sprintf(server_hdr, "ttyd/%s (libwebsockets/%s)", TTYD_VERSION, LWS_LIBRARY_VERSION); info.server_string = server_hdr; -#if LWS_LIBRARY_VERSION_MINOR >= 1 - info.ws_ping_pong_interval = 5; #endif +#if LWS_LIBRARY_VERSION_NUMBER >= 2001000 + info.ws_ping_pong_interval = 5; #endif if (strlen(iface) > 0) { -- 2.43.4