Explorar o código

set session maxtime

zhangxinlei1996 %!s(int64=3) %!d(string=hai) anos
pai
achega
b6d0b8b011
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/github.com/go-xweb/httpsession/redissessionstore.go

+ 1 - 1
src/github.com/go-xweb/httpsession/redissessionstore.go

@@ -74,7 +74,7 @@ func (store *redisStore) SetMultiple(id Id, m map[string]interface{}) {
 		userdata[k] = v
 	}
 	timeout := int(store.maxAge.Seconds())
-	if RedisNotLoginKey != "" && m[RedisNotLoginKey] == nil {
+	if RedisNotLoginKey != "" && userdata[RedisNotLoginKey] == nil {
 		timeout = RedisNotLoginExpire
 	}
 	putdata, _ := json.Marshal(userdata)