1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-25 08:21:55 +03:00

Merge pull request #1574 from go-redis/fix/wait-goroutine-to-finish

Wait for the goroutine to finish
This commit is contained in:
Vladimir Mihailenco
2020-12-06 17:27:38 +02:00
committed by GitHub

View File

@ -316,6 +316,8 @@ func (c *baseClient) withConn(
select {
case <-done:
_ = cn.Close()
// Wait for the goroutine to finish and send something.
<-errc
err = ctx.Err()
return err