mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Merge #10061: [net] Added SetSocketNoDelay() utility function
ad415bc [net] Added SetSocketNoDelay() utility function (Thomas Snider)
Tree-SHA512: c19e3c9910b3fc2ef86f2434f3e91d343e9cd9e2116153941de9789e2a6fc0389bffe762d21b55cda4a4b1de993afee0564c6946e65d05cef9e866b58896f9af
This commit is contained in:
@@ -1071,12 +1071,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
|
||||
|
||||
// According to the internet TCP_NODELAY is not carried into accepted sockets
|
||||
// on all platforms. Set it again here just to be sure.
|
||||
int set = 1;
|
||||
#ifdef WIN32
|
||||
setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (const char*)&set, sizeof(int));
|
||||
#else
|
||||
setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (void*)&set, sizeof(int));
|
||||
#endif
|
||||
SetSocketNoDelay(hSocket);
|
||||
|
||||
if (IsBanned(addr) && !whitelisted)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user