diff --git a/ClientApp/ClientApp.csproj b/ClientApp/ClientApp.csproj index 637f86c..3fdfbd2 100644 --- a/ClientApp/ClientApp.csproj +++ b/ClientApp/ClientApp.csproj @@ -21,13 +21,13 @@ Always - Always + PreserveNewest - Always + PreserveNewest - Always + PreserveNewest Always diff --git a/Server/Client.cs b/Server/Client.cs index 0364d38..acd509f 100644 --- a/Server/Client.cs +++ b/Server/Client.cs @@ -34,7 +34,7 @@ namespace Server private void OnRead(IAsyncResult ar) { - if (ar == null || (!ar.IsCompleted) || (!this.stream.CanRead)) + if (ar == null || (!ar.IsCompleted) || (!this.stream.CanRead) || !this.tcpClient.Client.Connected) return; int receivedBytes = this.stream.EndRead(ar);