Fix specifying a TCP listen backlog of 0 causing some systems to not accept any incoming connections. Fixes #1369.

This commit is contained in:
binary1248 2018-04-07 15:20:11 +02:00
parent d032050ccf
commit c706f11f29
No known key found for this signature in database
GPG Key ID: E5E52A5D6082224A

View File

@ -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;