Skip to content

Commit

Permalink
[FAB-11135] minor fix in pkcs11 object handle
Browse files Browse the repository at this point in the history
Change-Id: I111630cb415350ea2dfc04b972f45c2a2fe50a27
Signed-off-by: Sudesh Shetty <sudesh.shetty@securekey.com>
  • Loading branch information
sudeshrshetty committed Jul 13, 2018
1 parent fce3f3b commit 78f2bba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -85,10 +85,10 @@ func AddSession(rwMtx sync.RWMutex, key string) {
rwMtx.RUnlock()

if !ok {
rwMtx.Lock()
if sessionCache == nil {
sessionCache = make(map[string]*lazycache.Cache)
}
rwMtx.Lock()
sessionCache[key] = lazycache.New(
"KeyPair_Resolver_Cache",
func(key lazycache.Key) (interface{}, error) {
Expand Down
Expand Up @@ -99,10 +99,10 @@ index 0000000..4772d51
+ rwMtx.RUnlock()
+
+ if !ok {
+ rwMtx.Lock()
+ if sessionCache == nil {
+ sessionCache = make(map[string]*lazycache.Cache)
+ }
+ rwMtx.Lock()
+ sessionCache[key] = lazycache.New(
+ "KeyPair_Resolver_Cache",
+ func(key lazycache.Key) (interface{}, error) {
Expand Down

0 comments on commit 78f2bba

Please sign in to comment.