You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ra...@apache.org on 2021/11/05 16:08:40 UTC

[trafficcontrol] branch master updated: Fix nil panic from using var when err exists (#6333)

This is an automated email from the ASF dual-hosted git repository.

rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b00875  Fix nil panic from using var when err exists (#6333)
6b00875 is described below

commit 6b00875ca8b4f3585c36bfb71ef8b8d172619e16
Author: Robert O Butts <ro...@users.noreply.github.com>
AuthorDate: Fri Nov 5 10:08:29 2021 -0600

    Fix nil panic from using var when err exists (#6333)
---
 cache-config/t3c-apply/torequest/torequest.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cache-config/t3c-apply/torequest/torequest.go b/cache-config/t3c-apply/torequest/torequest.go
index 2ba5b40..2b6e6e5 100644
--- a/cache-config/t3c-apply/torequest/torequest.go
+++ b/cache-config/t3c-apply/torequest/torequest.go
@@ -675,11 +675,11 @@ func (r *TrafficOpsReq) CheckRevalidateState(sleepOverride bool) (UpdateStatus,
 	updateStatus := UpdateTropsNotNeeded
 
 	serverStatus, err := getUpdateStatus(r.Cfg)
-	log.Infof("my status: %s\n", serverStatus.Status)
 	if err != nil {
 		log.Errorln("getting update status: " + err.Error())
 		return UpdateTropsNotNeeded, errors.New("getting update status: " + err.Error())
 	}
+	log.Infof("my status: %s\n", serverStatus.Status)
 	if serverStatus.UseRevalPending == false {
 		log.Errorln("Update URL: Instant invalidate is not enabled.  Separated revalidation requires upgrading to Traffic Ops version 2.2 and enabling this feature.")
 		return UpdateTropsNotNeeded, nil