multiple clients works

This commit is contained in:
shinichi
2020-10-19 13:24:38 +02:00
parent bc738d0fa3
commit 134bf235c3
2 changed files with 4 additions and 4 deletions

View File

@@ -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);