Skip to content

Commit

Permalink
Fix nil panic from using var when err exists (#6333)
Browse files Browse the repository at this point in the history
  • Loading branch information
rob05c authored Nov 5, 2021
1 parent c4a2522 commit 6b00875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache-config/t3c-apply/torequest/torequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b00875

Please sign in to comment.