Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
27eccc1ed2 |
8
redis.go
8
redis.go
@@ -625,12 +625,12 @@ func NewStore(opts ...store.Option) *Store {
|
||||
}
|
||||
|
||||
func (r *Store) configure() error {
|
||||
universalOptions := &goredis.UniversalOptions{}
|
||||
|
||||
if r.cli != nil && r.opts.Context == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
universalOptions := DefaultUniversalOptions
|
||||
|
||||
if r.opts.Context != nil {
|
||||
if o, ok := r.opts.Context.Value(configKey{}).(*goredis.Options); ok {
|
||||
universalOptions.Addrs = []string{o.Addr}
|
||||
@@ -704,10 +704,6 @@ func (r *Store) configure() error {
|
||||
}
|
||||
}
|
||||
|
||||
if universalOptions == nil {
|
||||
universalOptions = DefaultUniversalOptions
|
||||
}
|
||||
|
||||
if len(r.opts.Addrs) > 0 {
|
||||
universalOptions.Addrs = r.opts.Addrs
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user