diff --git a/GVFS/GVFS.Service/ProductUpgradeTimer.cs b/GVFS/GVFS.Service/ProductUpgradeTimer.cs index b9bb0a7555..cfaed13c9a 100644 --- a/GVFS/GVFS.Service/ProductUpgradeTimer.cs +++ b/GVFS/GVFS.Service/ProductUpgradeTimer.cs @@ -139,20 +139,22 @@ private void TimerCallback(object unusedState) return; } } - - errorMessage = string.Format( - "{0}.{1}: Configured Product Upgrader does not support anonymous version queries.", - nameof(ProductUpgradeTimer), - nameof(this.TimerCallback), - errorMessage); - - activity.RelatedWarning( - metadata: new EventMetadata(), - message: errorMessage, - keywords: Keywords.Telemetry); - - info.RecordHighestAvailableVersion(highestAvailableVersion: null); - return; + else + { + errorMessage = string.Format( + "{0}.{1}: Configured Product Upgrader does not support anonymous version queries.", + nameof(ProductUpgradeTimer), + nameof(this.TimerCallback), + errorMessage); + + activity.RelatedWarning( + metadata: new EventMetadata(), + message: errorMessage, + keywords: Keywords.Telemetry); + + info.RecordHighestAvailableVersion(highestAvailableVersion: null); + return; + } } InstallerPreRunChecker prerunChecker = new InstallerPreRunChecker(this.tracer, string.Empty);