diff --git a/CoreBase/Network/BaseServer.cs b/CoreBase/Network/BaseServer.cs index 1641e25e1..1bb70ed3a 100644 --- a/CoreBase/Network/BaseServer.cs +++ b/CoreBase/Network/BaseServer.cs @@ -195,7 +195,7 @@ void FreeBufferPosition() void OnAsyncListenCompletion(object sender, SocketAsyncEventArgs listenArgs) { - if (_listen == null || listenArgs.SocketError is SocketError.ConnectionReset) + if (_listen == null) return; BaseClient baseClient = null; @@ -203,6 +203,9 @@ void OnAsyncListenCompletion(object sender, SocketAsyncEventArgs listenArgs) try { + if (listenArgs.SocketError is SocketError.ConnectionReset) + return; + baseClient = GetNewClient(socket); baseClient.Receive(); baseClient.OnConnect();