mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Fix defer order.
This commit is contained in:
@ -162,8 +162,8 @@ func (d *sentinelFailover) Pool() *pool.ConnPool {
|
||||
}
|
||||
|
||||
func (d *sentinelFailover) MasterAddr() (string, error) {
|
||||
defer d.mu.Unlock()
|
||||
d.mu.Lock()
|
||||
defer d.mu.Unlock()
|
||||
|
||||
// Try last working sentinel.
|
||||
if d.sentinel != nil {
|
||||
|
Reference in New Issue
Block a user