1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Wait for the goroutine to finish

This commit is contained in:
Vladimir Mihailenco
2020-12-06 14:55:00 +02:00
parent 2e398ada86
commit 2c9c526023

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