fix tcp send also

This commit is contained in:
Lion Kortlepel 2024-06-22 23:56:18 +02:00
parent bfb0675efa
commit 07a8d49046
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -28,6 +28,7 @@
#include <boost/asio/ip/address.hpp>
#include <boost/asio/ip/address_v4.hpp>
#include <cstring>
#include <zlib.h>
typedef boost::asio::detail::socket_option::integer<SOL_SOCKET, SO_RCVTIMEO> rcv_timeout_option;
@ -965,7 +966,7 @@ void TNetwork::SendToAll(TClient* c, const std::vector<uint8_t>& Data, bool Self
}
if (Self || Client.get() != c) {
if (Client->IsSynced() || Client->IsSyncing()) {
if (Rel || C == 'W' || C == 'Y' || C == 'V' || C == 'E') {
if (Rel || C == 'W' || C == 'Y' || C == 'V' || C == 'E' || compressBound(Data.size()) > 1024) {
if (C == 'O' || C == 'T' || Data.size() > 1000) {
if (Data.size() > 400) {
auto CompressedData = Data;