summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/ServerHandleImpl.cpp
diff options
context:
space:
mode:
authormjagdis <mjagdis@eris-associates.co.uk>2024-05-31 13:04:51 +0200
committerGitHub <noreply@github.com>2024-05-31 13:04:51 +0200
commita66a67c2ab50aee3f17015eb48df92e11d9597a1 (patch)
tree1778de07d4d2822c8369dbef0e16658ae6e37894 /src/OSSupport/ServerHandleImpl.cpp
parentFixed dumpinfo plugin not finding Info.lua file if the plugin folder and name don't match (#5563) (diff)
downloadcuberite-a66a67c2ab50aee3f17015eb48df92e11d9597a1.tar
cuberite-a66a67c2ab50aee3f17015eb48df92e11d9597a1.tar.gz
cuberite-a66a67c2ab50aee3f17015eb48df92e11d9597a1.tar.bz2
cuberite-a66a67c2ab50aee3f17015eb48df92e11d9597a1.tar.lz
cuberite-a66a67c2ab50aee3f17015eb48df92e11d9597a1.tar.xz
cuberite-a66a67c2ab50aee3f17015eb48df92e11d9597a1.tar.zst
cuberite-a66a67c2ab50aee3f17015eb48df92e11d9597a1.zip
Diffstat (limited to 'src/OSSupport/ServerHandleImpl.cpp')
-rw-r--r--src/OSSupport/ServerHandleImpl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp
index e68f82757..669a0f83f 100644
--- a/src/OSSupport/ServerHandleImpl.cpp
+++ b/src/OSSupport/ServerHandleImpl.cpp
@@ -328,6 +328,9 @@ void cServerHandleImpl::Callback(evconnlistener * a_Listener, evutil_socket_t a_
return;
}
+ const int one = 1;
+ setsockopt(a_Socket, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<const char *>(&one), sizeof(one));
+
// Create a new cTCPLink for the incoming connection:
cTCPLinkImplPtr Link = std::make_shared<cTCPLinkImpl>(a_Socket, LinkCallbacks, Self->m_SelfPtr, a_Addr, static_cast<socklen_t>(a_Len));
{