]> prime8.dev >> repos - ttyd.git/commitdiff
server: fix unix domain socket for lws 4.0
authorShuanglei Tao <tsl0922@gmail.com>
Sun, 26 Jul 2020 02:56:25 +0000 (10:56 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Sun, 26 Jul 2020 02:56:25 +0000 (10:56 +0800)
src/server.c

index 4043c61a6998af1e778a4782c3f7a0283694bac2..ffd73859ef70877339a7f771922c330017c93610 100644 (file)
@@ -458,6 +458,7 @@ int main(int argc, char **argv) {
     if (endswith(info.iface, ".sock") || endswith(info.iface, ".socket")) {
 #if defined(LWS_USE_UNIX_SOCK) || defined(LWS_WITH_UNIX_SOCK)
       info.options |= LWS_SERVER_OPTION_UNIX_SOCK;
+      info.port = 0; // warmcat/libwebsockets#1985
       strncpy(server->socket_path, info.iface, sizeof(server->socket_path) - 1);
 #else
       fprintf(stderr,