mirror of
https://github.com/minio/minio.git
synced 2025-07-26 17:00:10 -04:00
Hold lock on GetGlobalStateKey() - fixes #652
This commit is contained in:
parent
b793f53d48
commit
e9a3fd677a
@ -87,7 +87,9 @@ func GetGlobalState() map[string]string {
|
|||||||
|
|
||||||
// GetGlobalStateKey - get value for key from globalState struct
|
// GetGlobalStateKey - get value for key from globalState struct
|
||||||
func GetGlobalStateKey(k string) string {
|
func GetGlobalStateKey(k string) string {
|
||||||
|
globalState.RLock()
|
||||||
result, ok := globalState.m[k]
|
result, ok := globalState.m[k]
|
||||||
|
globalState.RUnlock()
|
||||||
if !ok {
|
if !ok {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user