Skip to content

Commit

Permalink
fix: Fixed message when sending too large broadcast/unconnected messages
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoTenPvP committed Sep 30, 2020
1 parent b70f5c4 commit d503a03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Ruffles/Core/RuffleSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ public bool SendUnconnected(ArraySegment<byte> payload, IPEndPoint endpoint)
{
if (payload.Count > Config.MinimumMTU)
{
if (Logging.CurrentLogLevel <= LogLevel.Error) Logging.LogError("Tried to send unconnected message that was too large. [Size=" + payload.Count + "] [MaxMessageSize=" + Config.MaxFragments + "]");
if (Logging.CurrentLogLevel <= LogLevel.Error) Logging.LogError("Tried to send unconnected message that was too large. [Size=" + payload.Count + "] [MaxMessageSize=" + Config.MinimumMTU + "]");
return false;
}

Expand Down Expand Up @@ -680,7 +680,7 @@ public bool SendBroadcast(ArraySegment<byte> payload, int port)
{
if (payload.Count > Config.MinimumMTU)
{
if (Logging.CurrentLogLevel <= LogLevel.Error) Logging.LogError("Tried to send broadcast message that was too large. [Size=" + payload.Count + "] [MaxMessageSize=" + Config.MaxFragments + "]");
if (Logging.CurrentLogLevel <= LogLevel.Error) Logging.LogError("Tried to send broadcast message that was too large. [Size=" + payload.Count + "] [MaxMessageSize=" + Config.MinimumMTU + "]");
return false;
}

Expand Down

0 comments on commit d503a03

Please sign in to comment.