NetCoreServer
NetCoreServer copied to clipboard
fix(UdpServer): Recycle event args for different remote endpoints
This fixes an issue that is first seen in .NET 8 where the socket address is now internally cached inside the event args between calls (https://github.com/dotnet/runtime/blob/v8.0.1/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L3098-L3107). Without this fix, all socket operations will go to the first configured remote endpoint.
For reference, this was found to be a regression in .NET 8, see https://github.com/dotnet/runtime/issues/97965#issuecomment-1932889510.
I am closing this as the regression was fixed in .NET 8.0.7 that was released yesterday.