Update session.go
This commit is contained in:
parent
8ef61bc1dd
commit
25b204f610
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ func Session(secret string) gin.HandlerFunc {
|
|||
// Redis设置不为空,且非测试模式时使用Redis
|
||||
if conf.RedisConfig.Server != "" && gin.Mode() != gin.TestMode {
|
||||
var err error
|
||||
Store, err = redis.NewStoreWithDB(10, "tcp", conf.RedisConfig.Server, conf.RedisConfig.Password, conf.RedisConfig.DB, []byte(secret))
|
||||
Store, err = redis.NewStoreWithDB(10, conf.RedisConfig.Network, conf.RedisConfig.Server, conf.RedisConfig.Password, conf.RedisConfig.DB, []byte(secret))
|
||||
if err != nil {
|
||||
util.Log().Panic("无法连接到 Redis:%s", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue