Browse Source

set session maxtime

zhangxinlei1996 3 năm trước cách đây
mục cha
commit
b6d0b8b011
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)