diff options
| author | wuyuxiang <wuyuxiang@corp.netease.com> | 2020-04-14 10:22:40 +0800 |
|---|---|---|
| committer | wuyuxiang <wuyuxiang@corp.netease.com> | 2020-04-14 10:22:40 +0800 |
| commit | b556d3d03595620364781fcc10b5bc509112c400 (patch) | |
| tree | 8212215dd57ceae65ffb29eb5adfd4d28a32e72d | |
| parent | d8f5985e5e2a51719b7bf40a99c2728b475dbbf4 (diff) | |
| download | seaweedfs-b556d3d03595620364781fcc10b5bc509112c400.tar.xz seaweedfs-b556d3d03595620364781fcc10b5bc509112c400.zip | |
Fix data race about config
| -rw-r--r-- | weed/util/config.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/util/config.go b/weed/util/config.go index 33809d44d..7b6e92f08 100644 --- a/weed/util/config.go +++ b/weed/util/config.go @@ -42,7 +42,8 @@ func LoadConfiguration(configFileName string, required bool) (loaded bool) { } func GetViper() *viper.Viper { - v := viper.GetViper() + v := &viper.Viper{} + *v = *viper.GetViper() v.AutomaticEnv() v.SetEnvPrefix("weed") v.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) |
