Skip to content

Commit

Permalink
websockets.c: checking if compiled with unix doman sockets support
Browse files Browse the repository at this point in the history
  • Loading branch information
okisseloff committed Nov 20, 2023
1 parent 60b4c09 commit 875b32f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/websockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,13 @@ void mosq_websockets_init(struct mosquitto__listener *listener, const struct mos

memset(&info, 0, sizeof(info));
if(listener->port == 0){
#ifdef WITH_UNIX_SOCKETS
info.iface = listener->unix_socket_path;
info.options |= LWS_SERVER_OPTION_UNIX_SOCK;
#else
log__printf(NULL, MOSQ_LOG_ERR, "Unix Domain Sockets are disabled");
return;
#endif
}else{
info.iface = listener->host;
}
Expand Down

0 comments on commit 875b32f

Please sign in to comment.