From 8d74a9ead68de3d87c5c45bb3daa12a392de0d41 Mon Sep 17 00:00:00 2001 From: Yang Cao Date: Fri, 28 Apr 2023 16:56:10 -0400 Subject: [PATCH] Fix null guard bug (#2576) --- src/Runner.Common/ResultsServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Runner.Common/ResultsServer.cs b/src/Runner.Common/ResultsServer.cs index b36a5efbd..905d71708 100644 --- a/src/Runner.Common/ResultsServer.cs +++ b/src/Runner.Common/ResultsServer.cs @@ -131,13 +131,13 @@ namespace GitHub.Runner.Common private void InitializeWebsocketClient(string liveConsoleFeedUrl, string accessToken, TimeSpan delay, bool retryConnection = false) { - if (!string.IsNullOrEmpty(accessToken)) + if (string.IsNullOrEmpty(accessToken)) { Trace.Info($"No access token from server"); return; } - if (!string.IsNullOrEmpty(liveConsoleFeedUrl)) + if (string.IsNullOrEmpty(liveConsoleFeedUrl)) { Trace.Info($"No live console feed url from server"); return;