From c706f11f29f97999d06c2569f62780c3c3c7891e Mon Sep 17 00:00:00 2001 From: binary1248 Date: Sat, 7 Apr 2018 15:20:11 +0200 Subject: [PATCH] Fix specifying a TCP listen backlog of 0 causing some systems to not accept any incoming connections. Fixes #1369. --- src/SFML/Network/TcpListener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SFML/Network/TcpListener.cpp b/src/SFML/Network/TcpListener.cpp index 0e3561f94..ce62fe767 100644 --- a/src/SFML/Network/TcpListener.cpp +++ b/src/SFML/Network/TcpListener.cpp @@ -80,7 +80,7 @@ Socket::Status TcpListener::listen(unsigned short port, const IpAddress& address } // Listen to the bound port - if (::listen(getHandle(), 0) == -1) + if (::listen(getHandle(), SOMAXCONN) == -1) { // Oops, socket is deaf err() << "Failed to listen to port " << port << std::endl;