chronoxor / NetCoreServer

Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
https://chronoxor.github.io/NetCoreServer
MIT License
2.63k stars 550 forks source link

fix(UdpServer): Recycle event args for different remote endpoints #284

Closed rmja closed 1 month ago

rmja commented 7 months ago

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.

rmja commented 6 months ago

For reference, this was found to be a regression in .NET 8, see https://github.com/dotnet/runtime/issues/97965#issuecomment-1932889510.

rmja commented 1 month ago

I am closing this as the regression was fixed in .NET 8.0.7 that was released yesterday.