|
@@ -59,6 +59,8 @@ func (h *Hub) createPool(addr string, opts ...redis.DialOption) (*redis.Pool, er
|
|
|
func (h *Hub) conn() error {
|
|
|
dialOpts := []redis.DialOption{
|
|
|
redis.DialConnectTimeout(5 * time.Second),
|
|
|
+ redis.DialReadTimeout(500 * time.Millisecond),
|
|
|
+ redis.DialWriteTimeout(500 * time.Millisecond),
|
|
|
}
|
|
|
|
|
|
nodes := viper.GetStringSlice("redis.nodes")
|