fix: use its own lock in serverConfigV17 (#4014)

Previously serverConfigV17 used a global lock that made any instance of
serverConfigV17 depended on single global serverConfigMu.

This patch fixes by having individual lock per instances.
This commit is contained in:
Bala FA
2017-03-31 10:56:24 +05:30
committed by Harshavardhana
parent 2df8160f6a
commit 6e9c91f43a
4 changed files with 127 additions and 159 deletions

View File

@@ -357,8 +357,7 @@ func initConfig() {
// Config file does not exist, we create it fresh and return upon success.
if isFile(getConfigFile()) {
fatalIf(migrateConfig(), "Config migration failed.")
fatalIf(validateConfig(), "Unable to validate configuration file")
fatalIf(loadConfig(), "Unable to initialize minio config")
fatalIf(loadConfig(), "Unable to load minio config file")
} else {
fatalIf(newConfig(), "Unable to initialize minio config for the first time.")
log.Println("Created minio configuration file successfully at " + getConfigDir())