Skip to content

Commit

Permalink
Increase packet buffer, to prevent saturation (#887)
Browse files Browse the repository at this point in the history
Co-authored-by: Bytekeeper <bytekeeper@mailbox.org>
  • Loading branch information
Bytekeeper and Bytekeeper committed Mar 11, 2022
1 parent 3d731b1 commit 45360dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 1.16.1/SNP_DirectIP/src/LocalPC/LocalPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace SMEM
char ad[512];
bool isAdvertising;
int incomingCount;
Packet incoming[16];
Packet incoming[2048];

bool inline isOccupied() const
{
Expand Down Expand Up @@ -142,9 +142,9 @@ namespace SMEM
// push the packet on target's packetqueue
PeerData &peerData = shd->peer[peerid];
int slotIndex = peerData.incomingCount++;
if(slotIndex >= 16)
if(slotIndex >= 2048)
{
DropMessage(1, "stacked 16 packets, no space");
DropMessage(1, "stacked 2048 packets, no space");
return;
}
if(packet.size() > 508)
Expand Down

0 comments on commit 45360dc

Please sign in to comment.