Commit c805ae8c authored by Jacob Vosmaer's avatar Jacob Vosmaer

Fix sentinel address parsing

parent 18536234
...@@ -3,6 +3,7 @@ package redis ...@@ -3,6 +3,7 @@ package redis
import ( import (
"errors" "errors"
"fmt" "fmt"
"log"
"net" "net"
"net/url" "net/url"
"time" "time"
...@@ -63,7 +64,9 @@ func sentinelConn(master string, urls []config.TomlURL) *sentinel.Sentinel { ...@@ -63,7 +64,9 @@ func sentinelConn(master string, urls []config.TomlURL) *sentinel.Sentinel {
} }
var addrs []string var addrs []string
for _, url := range urls { for _, url := range urls {
addrs = append(addrs, url.URL.String()) h := url.URL.Host
log.Printf("redis: using sentinel %q", h)
addrs = append(addrs, h)
} }
return &sentinel.Sentinel{ return &sentinel.Sentinel{
Addrs: addrs, Addrs: addrs,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment