aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xdsserver/sdks.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xdsserver/sdks.go')
-rw-r--r--lib/xdsserver/sdks.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/xdsserver/sdks.go b/lib/xdsserver/sdks.go
index c006861..6094045 100644
--- a/lib/xdsserver/sdks.go
+++ b/lib/xdsserver/sdks.go
@@ -63,6 +63,12 @@ func NewSDKs(ctx *Context) (*SDKs, error) {
return &s, err
}
+ // Update SDK DB on startup by default (can be disable using config file)
+ update := true
+ if s.Config.FileConf.SdkDbUpdate != "startup" {
+ update = false
+ }
+
s.mutex.Lock()
defer s.mutex.Unlock()
@@ -73,10 +79,11 @@ func NewSDKs(ctx *Context) (*SDKs, error) {
continue
}
- sdksList, err := ListCrossSDK(d, s.Log)
+ sdksList, err := ListCrossSDK(d, update, s.Log)
if err != nil {
// allow to use XDS even if error on list
s.Log.Errorf("Cannot retrieve SDK list: %v", err)
+ sdksList, _ = ListCrossSDK(d, false, s.Log)
}
s.LogSillyf("'%s' SDKs list: %v", d, sdksList)