diff --git a/ydb/library/actors/interconnect/interconnect_common.h b/ydb/library/actors/interconnect/interconnect_common.h index ea441d78fc6c..2af2290ce4d8 100644 --- a/ydb/library/actors/interconnect/interconnect_common.h +++ b/ydb/library/actors/interconnect/interconnect_common.h @@ -55,14 +55,6 @@ namespace NActors { TDuration MaxErrorSleep = TDuration::Seconds(1); double ErrorSleepRetryMultiplier = 4.0; TDuration EventDelay = TDuration::Zero(); - - ui32 GetSendBufferSize() const { - ui32 res = 512 * 1024; // 512 kb is the default value for send buffer - if (TCPSocketBufferSize) { - res = TCPSocketBufferSize; - } - return res; - } }; struct TWhiteboardSessionStatus { diff --git a/ydb/library/actors/interconnect/interconnect_handshake.cpp b/ydb/library/actors/interconnect/interconnect_handshake.cpp index 4f64ea4e75a8..2b9bbb296720 100644 --- a/ydb/library/actors/interconnect/interconnect_handshake.cpp +++ b/ydb/library/actors/interconnect/interconnect_handshake.cpp @@ -150,7 +150,9 @@ namespace NActors { } // setup send buffer size - Socket->SetSendBufferSize(Actor->Common->Settings.GetSendBufferSize()); + if (const auto& buffer = Actor->Common->Settings.TCPSocketBufferSize) { + Socket->SetSendBufferSize(buffer); + } } void RegisterInPoller() { diff --git a/ydb/library/actors/interconnect/interconnect_tcp_server.cpp b/ydb/library/actors/interconnect/interconnect_tcp_server.cpp index c22f888e8c4a..7cc3be8d33ab 100644 --- a/ydb/library/actors/interconnect/interconnect_tcp_server.cpp +++ b/ydb/library/actors/interconnect/interconnect_tcp_server.cpp @@ -41,7 +41,9 @@ namespace NActors { return error; } SetNonBlock(*Listener); - Listener->SetSendBufferSize(ProxyCommonCtx->Settings.GetSendBufferSize()); // TODO(alexvru): WTF? + if (const auto& buffer = ProxyCommonCtx->Settings.TCPSocketBufferSize) { + Listener->SetSendBufferSize(buffer); + } SetSockOpt(*Listener, SOL_SOCKET, SO_REUSEADDR, 1); if (addr.GetFamily() == AF_INET6) { SetSockOpt(*Listener, IPPROTO_IPV6, IPV6_V6ONLY, 0);