]> prime8.dev >> repos - ttyd.git/commitdiff
src: fix lws version check for keep alive
authorShuanglei Tao <tsl0922@gmail.com>
Sat, 2 May 2020 15:26:59 +0000 (23:26 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Sat, 2 May 2020 15:26:59 +0000 (23:26 +0800)
src/server.c

index c7ee1ef24fd67c290294cbeccd554ce9e838ae16..c1e7c330dc17d849ade569fd5c8e12a59533081e 100644 (file)
@@ -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) {