Use loadCachedConfigs appropriately to load ENVs (#7187)

This commit is contained in:
Harshavardhana
2019-02-03 21:01:11 -08:00
committed by Nitish Tiwari
parent 6f08edfb36
commit ea6d61ab1f
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -203,6 +203,9 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
// Override any values from ENVs.
srvCfg.loadFromEnvs()
// Load values to cached global values.
srvCfg.loadToCachedConfigs()
// hold the mutex lock before a new config is assigned.
globalServerConfigMu.Lock()
globalServerConfig = srvCfg