Paul hace 6 años
padre
commit
8ca2f9ebce
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      middleware/auth/session_redis.go

+ 1
- 1
middleware/auth/session_redis.go Ver fichero

12
 }
12
 }
13
 
13
 
14
 func NewRedisSessionStore(address string, password string) *RedisSessionStore {
14
 func NewRedisSessionStore(address string, password string) *RedisSessionStore {
15
-	session := &RedisSessionStore{}
15
+	session := &RedisSessionStore{once:&sync.Once{}}
16
 	session.once.Do(func() {
16
 	session.once.Do(func() {
17
 		session.client = redis.NewClient(&redis.Options{
17
 		session.client = redis.NewClient(&redis.Options{
18
 			Addr:     address,
18
 			Addr:     address,