Change: use 32 KiB packets to transfer the savegame

This commit is contained in:
Rubidium
2021-04-18 14:56:25 +02:00
committed by rubidium42
parent d6000c2ec5
commit 21f58ab437
2 changed files with 17 additions and 3 deletions

View File

@@ -158,7 +158,7 @@ struct PacketWriter : SaveFilter {
/* We want to abort the saving when the socket is closed. */
if (this->cs == nullptr) SlError(STR_NETWORK_ERROR_LOSTCONNECTION);
if (this->current == nullptr) this->current = new Packet(PACKET_SERVER_MAP_DATA);
if (this->current == nullptr) this->current = new Packet(PACKET_SERVER_MAP_DATA, TCP_MTU);
std::lock_guard<std::mutex> lock(this->mutex);
@@ -169,7 +169,7 @@ struct PacketWriter : SaveFilter {
if (!this->current->CanWriteToPacket(1)) {
this->AppendQueue();
if (buf != bufe) this->current = new Packet(PACKET_SERVER_MAP_DATA);
if (buf != bufe) this->current = new Packet(PACKET_SERVER_MAP_DATA, TCP_MTU);
}
}