From: Shuanglei Tao Date: Sat, 2 May 2020 15:26:59 +0000 (+0800) Subject: src: fix lws version check for keep alive X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=ff2eebc4cc72eca3208854e9a562336c0e6ec68c;p=ttyd.git src: fix lws version check for keep alive --- 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) {