From 1ddc2ddd59b4494e242b56103e48403d1ddff20e Mon Sep 17 00:00:00 2001 From: lodicolo Date: Fri, 2 Aug 2024 14:05:50 -0400 Subject: [PATCH] fix: pass empty array into Ping.Send() to avoid cap_net_raw breaking change (#2366) https://learn.microsoft.com/en-us/dotnet/core/compatibility/networking/7.0/ping-custom-payload-linux --- Intersect.Network/ClientNetwork.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Intersect.Network/ClientNetwork.cs b/Intersect.Network/ClientNetwork.cs index eb8591607..5449d5540 100644 --- a/Intersect.Network/ClientNetwork.cs +++ b/Intersect.Network/ClientNetwork.cs @@ -61,7 +61,7 @@ public int Ping get { // Send a ping to the server. Timeout: 5000ms (5 seconds). Packet size: 32 bytes. TTL: 64. Don't fragment. - var reply = new Ping().Send(Configuration.Host, 5000, new byte[32], new PingOptions(64, true)); + var reply = new Ping().Send(Configuration.Host, 5000, [], new PingOptions(64, true)); // Return the roundtrip time in milliseconds (ms) as an integer value (no decimals). return reply?.Status == IPStatus.Success ? (int)reply.RoundtripTime : 999999;