/// <summary> /// Ignore any stale data we may have waiting on the stream /// </summary> /// <returns></returns> private async Task IgnoreStaleData() { if (IsConnected && ControlStream.SocketDataAvailable()) { var staleData = await ControlStream.GetResponseAsync(); Logger?.LogWarning($"Stale data detected: {staleData.ResponseMessage}"); } }