Change: use 32 KiB packets to transfer the savegame
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user