From: Shuanglei Tao Date: Sun, 26 Jul 2020 02:56:25 +0000 (+0800) Subject: server: fix unix domain socket for lws 4.0 X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=e34fd09dee660bbd9c5d8ecf78c54ac1e2aff3c1;p=ttyd.git server: fix unix domain socket for lws 4.0 --- 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,