diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 48463882..2f8b4536 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -2879,7 +2879,7 @@ libwebsocket_create_context(int port, const char *interf, wsi->mode = LWS_CONNMODE_SERVER_LISTENER; insert_wsi(context, wsi); - listen(sockfd, 5); + listen(sockfd, SOMAXCONN); fprintf(stderr, " Listening on port %d\n", port); /* list in the internal poll array */