Skip to content

Commit

Permalink
fix: Fixed packet drop timeout calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoTenPvP committed Sep 11, 2019
1 parent a15d28f commit 583b8ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ruffles/Core/RuffleSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ private void CheckConnectionTimeouts()
{
// They are no longer covered by connection quality grace. Check their ping and packet loss

if ((double)connections[i].OutgoingResentPackets / connections[i].OutgoingResentPackets > config.MaxPacketLossPercentage)
if ((1 - (double)connections[i].OutgoingConfirmedPackets / connections[i].OutgoingResentPackets) > config.MaxPacketLossPercentage)
{
// They have too high of a packet drop. Disconnect them
DisconnectConnection(connections[i], false, true);
Expand Down

0 comments on commit 583b8ad

Please sign in to comment.