1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Close the conn on context timeout

This commit is contained in:
Vladimir Mihailenco
2020-12-06 11:05:42 +02:00
parent 43d9b98d48
commit 02ccf05ed0
4 changed files with 50 additions and 21 deletions

View File

@ -175,8 +175,8 @@ func redisRingOptions() *redis.RingOptions {
func performAsync(n int, cbs ...func(int)) *sync.WaitGroup {
var wg sync.WaitGroup
for _, cb := range cbs {
wg.Add(n)
for i := 0; i < n; i++ {
wg.Add(1)
go func(cb func(int), i int) {
defer GinkgoRecover()
defer wg.Done()