From 6be59bb3edc6cde3c8a26a4278dcd3710413edb0 Mon Sep 17 00:00:00 2001 From: Valentin Kuznetsov Date: Thu, 6 Jan 2022 10:48:21 -0500 Subject: [PATCH] Start cric update goroutine only if CRIC URL is provided --- main.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 5e81998..3f86366 100644 --- a/main.go +++ b/main.go @@ -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