Skip to content

Commit e9376db

Browse files
committed
Fix linting issues
1 parent 31f2dbd commit e9376db

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

internal/pool/pool.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,6 @@ func GetMaintenanceNotificationCallback() func(ctx context.Context, cn *Conn, no
132132
return maintenanceNotificationCallback
133133
}
134134

135-
var timers = sync.Pool{
136-
New: func() interface{} {
137-
t := time.NewTimer(time.Hour)
138-
t.Stop()
139-
return t
140-
},
141-
}
142135

143136
// Stats contains pool state information and accumulated stats.
144137
type Stats struct {

redis.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ func (c *baseClient) process(ctx context.Context, cmd Cmder) error {
680680
totalAttempts++
681681
attempt := attempt
682682

683-
retry, err, cn := c._process(ctx, cmd, attempt)
683+
retry, cn, err := c._process(ctx, cmd, attempt)
684684
if cn != nil {
685685
lastConn = cn
686686
}
@@ -714,10 +714,10 @@ func (c *baseClient) assertUnstableCommand(cmd Cmder) (bool, error) {
714714
}
715715
}
716716

717-
func (c *baseClient) _process(ctx context.Context, cmd Cmder, attempt int) (bool, error, *pool.Conn) {
717+
func (c *baseClient) _process(ctx context.Context, cmd Cmder, attempt int) (bool, *pool.Conn, error) {
718718
if attempt > 0 {
719719
if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
720-
return false, err, nil
720+
return false, nil, err
721721
}
722722
}
723723

@@ -765,10 +765,10 @@ func (c *baseClient) _process(ctx context.Context, cmd Cmder, attempt int) (bool
765765
return nil
766766
}); err != nil {
767767
retry := shouldRetry(err, atomic.LoadUint32(&retryTimeout) == 1)
768-
return retry, err, usedConn
768+
return retry, usedConn, err
769769
}
770770

771-
return false, nil, usedConn
771+
return false, usedConn, nil
772772
}
773773

774774
func (c *baseClient) retryBackoff(attempt int) time.Duration {

0 commit comments

Comments
 (0)