I have a loop like this inside a try-catch block:
try { while ((receivedBytesCount = await tcpClient.GetStream().ReadAsync(rxBytes, 0, rxBytes.Length, tcp