mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-03-11 11:06:53 +08:00
fix(cache): panic if redis connection fails
This commit is contained in:
3
pkg/cache/redis.go
vendored
3
pkg/cache/redis.go
vendored
@@ -66,8 +66,7 @@ func NewRedisStore(size int, network, address, password, database string) *Redis
|
|||||||
redis.DialPassword(password),
|
redis.DialPassword(password),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.Log().Warning("Failed to create Redis connection: %s", err)
|
util.Log().Panic("Failed to create Redis connection: %s", err)
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
return c, nil
|
return c, nil
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user