Skip to content

Commit

Permalink
Start cric update goroutine only if CRIC URL is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Jan 6, 2022
1 parent 081b8d9 commit 6be59bb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,19 @@ func main() {

// start our servers
if useX509 {
go cric.UpdateCricRecords("dn", Config.CricFile, Config.CricURL, Config.UpdateCricInterval, Config.CricVerbose)
if Config.CricURL != "" {
go cric.UpdateCricRecords("dn", Config.CricFile, Config.CricURL, Config.UpdateCricInterval, Config.CricVerbose)
}
x509ProxyServer()
return
} else if scitokens {
scitokensServer()
return
}
// Get CRIC records
go cric.UpdateCricRecords("id", Config.CricFile, Config.CricURL, Config.UpdateCricInterval, Config.CricVerbose)
if Config.CricURL != "" {
// Get CRIC records
go cric.UpdateCricRecords("id", Config.CricFile, Config.CricURL, Config.UpdateCricInterval, Config.CricVerbose)
}
// Get AIM records
go getIAMInfo()
// start OAuth server
Expand Down

0 comments on commit 6be59bb

Please sign in to comment.