File tree Expand file tree Collapse file tree 2 files changed +0
-18
lines changed
server/memorystore/providers/inmemory Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -26,20 +26,11 @@ func (e *EnvStore) UpdateStore(store map[string]interface{}) {
2626
2727// GetStore returns the env store
2828func (e * EnvStore ) GetStore () map [string ]interface {} {
29- if os .Getenv ("ENV" ) != "test" {
30- e .mutex .Lock ()
31- defer e .mutex .Unlock ()
32- }
33-
3429 return e .store
3530}
3631
3732// Get returns the value of the key in evn store
3833func (e * EnvStore ) Get (key string ) interface {} {
39- if os .Getenv ("ENV" ) != "test" {
40- e .mutex .Lock ()
41- defer e .mutex .Unlock ()
42- }
4334 return e .store [key ]
4435}
4536
Original file line number Diff line number Diff line change @@ -19,10 +19,6 @@ func (c *provider) ClearStore() error {
1919
2020// GetUserSessions returns all the user session token from the in-memory store.
2121func (c * provider ) GetUserSessions (userId string ) map [string ]string {
22- if os .Getenv ("ENV" ) != "test" {
23- c .mutex .Lock ()
24- defer c .mutex .Unlock ()
25- }
2622 res := map [string ]string {}
2723 for k , v := range c .stateStore {
2824 split := strings .Split (v , "@" )
@@ -61,11 +57,6 @@ func (c *provider) SetState(key, state string) error {
6157
6258// GetState gets the state from the in-memory store.
6359func (c * provider ) GetState (key string ) (string , error ) {
64- if os .Getenv ("ENV" ) != "test" {
65- c .mutex .Lock ()
66- defer c .mutex .Unlock ()
67- }
68-
6960 state := ""
7061 if stateVal , ok := c .stateStore [key ]; ok {
7162 state = stateVal
You can’t perform that action at this time.
0 commit comments