From e34fd09dee660bbd9c5d8ecf78c54ac1e2aff3c1 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Sun, 26 Jul 2020 10:56:25 +0800 Subject: [PATCH] server: fix unix domain socket for lws 4.0 --- src/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server.c b/src/server.c index 4043c61..ffd7385 100644 --- a/src/server.c +++ b/src/server.c @@ -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, -- 2.43.4