Skip to content

Commit

Permalink
修改默认配置
Browse files Browse the repository at this point in the history
  • Loading branch information
letsfire committed Sep 10, 2020
1 parent 3646af1 commit 893a7a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ type ModeInterface interface {
// DefaultDialOpts 默认连接配置
func DefaultDialOpts() []redis.DialOption {
return []redis.DialOption{
// 使用Go默认心跳间隔
redis.DialKeepAlive(time.Second * 15),
redis.DialConnectTimeout(time.Second),
redis.DialReadTimeout(time.Second * 3),
redis.DialWriteTimeout(time.Second * 3),
Expand Down

0 comments on commit 893a7a2

Please sign in to comment.