From e9a3fd677ac1b21641c03575e8cd68087f1a71f1 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 17 Jun 2015 20:37:45 -0700 Subject: [PATCH] Hold lock on GetGlobalStateKey() - fixes #652 --- pkg/iodine/iodine.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/iodine/iodine.go b/pkg/iodine/iodine.go index b8ffd17b4..5dd3b4490 100644 --- a/pkg/iodine/iodine.go +++ b/pkg/iodine/iodine.go @@ -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 "" }