System.Net.Sockets.SocketException (0x80004005): 远程主机强迫关闭了一个现有的连接。(Chinese. Remote host closed current connection forcibly)
在(at) System.Net.Sockets.Socket.DoBeginReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult)
在(at) System.Net.Sockets.Socket.BeginReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP, AsyncCallback callback, Object state)
在(at) TNet.UdpProtocol.OnReceive(IAsyncResult result) 位置(location) d:\work\repo\warship-hunter-mad\dev\jinggle-server\TNet\TNet.Server\Common\TNUdpProtocol.cs:行号(line) 198
在(at) System.Net.LazyAsyncResult.Complete(IntPtr userToken)
在(at) System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在(at) System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在(at) System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在(at) System.Net.ContextAwareResult.Complete(IntPtr userToken)
在(at) System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
在(at) System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
It crashes when both BeginReceiveFrom and connection closed by remote at the same time.
This issue still exists in 2.0.4.
Maybe should wrap with try-catch.