Skip to content

Commit

Permalink
support retry times in session pool
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisChu committed Sep 11, 2024
1 parent 530bb43 commit f533579
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,14 @@ func WithHandshakeKey(handshakeKey string) SessionPoolConfOption {
conf.handshakeKey = handshakeKey
}
}
func WithRetryTimes(retryTimes int) SessionPoolConfOption {
if retryTimes < 0 {
retryTimes = 0
}
return func(conf *SessionPoolConf) {
conf.retryGetSessionTimes = retryTimes
}
}

func (conf *SessionPoolConf) checkMandatoryFields() error {
// Check mandatory fields
Expand Down

0 comments on commit f533579

Please sign in to comment.