summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-04-02 16:05:07 +0200
committerGitHub <noreply@github.com>2020-04-02 16:05:07 +0200
commit318d31dc394da9faea11544ad6e485f1b5eabbdb (patch)
tree5066790920079cb1e5db7196cbe984ed17d9856f
parentReplace buckets to the selected hotbar slot, rather than the first available. (#4580) (diff)
downloadcuberite-318d31dc394da9faea11544ad6e485f1b5eabbdb.tar
cuberite-318d31dc394da9faea11544ad6e485f1b5eabbdb.tar.gz
cuberite-318d31dc394da9faea11544ad6e485f1b5eabbdb.tar.bz2
cuberite-318d31dc394da9faea11544ad6e485f1b5eabbdb.tar.lz
cuberite-318d31dc394da9faea11544ad6e485f1b5eabbdb.tar.xz
cuberite-318d31dc394da9faea11544ad6e485f1b5eabbdb.tar.zst
cuberite-318d31dc394da9faea11544ad6e485f1b5eabbdb.zip
-rw-r--r--src/OSSupport/ServerHandleImpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp
index 562b2f902..56509a1a2 100644
--- a/src/OSSupport/ServerHandleImpl.cpp
+++ b/src/OSSupport/ServerHandleImpl.cpp
@@ -205,7 +205,7 @@ bool cServerHandleImpl::Listen(UInt16 a_Port)
evutil_closesocket(MainSock);
return false;
}
- if (listen(MainSock, 0) != 0)
+ if (listen(MainSock, SOMAXCONN) != 0)
{
m_ErrorCode = EVUTIL_SOCKET_ERROR();
Printf(m_ErrorMsg, "Cannot listen on port %d: %d (%s)", a_Port, m_ErrorCode, evutil_socket_error_to_string(m_ErrorCode));
@@ -263,7 +263,7 @@ bool cServerHandleImpl::Listen(UInt16 a_Port)
return true; // Report as success, the primary socket is working
}
- if (listen(SecondSock, 0) != 0)
+ if (listen(SecondSock, SOMAXCONN) != 0)
{
err = EVUTIL_SOCKET_ERROR();
LOGD("Cannot listen on secondary socket on port %d: %d (%s)", a_Port, err, evutil_socket_error_to_string(err));