Hold lock on GetGlobalStateKey() - fixes #652

This commit is contained in:
Harshavardhana 2015-06-17 20:37:45 -07:00
parent b793f53d48
commit e9a3fd677a
1 changed files with 2 additions and 0 deletions

View File

@ -87,7 +87,9 @@ func GetGlobalState() map[string]string {
// GetGlobalStateKey - get value for key from globalState struct
func GetGlobalStateKey(k string) string {
globalState.RLock()
result, ok := globalState.m[k]
globalState.RUnlock()
if !ok {
return ""
}