Skip to content

Commit 2c9c526

Browse files
committed
Wait for the goroutine to finish
1 parent 2e398ad commit 2c9c526

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

redis.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ func (c *baseClient) withConn(
316316
select {
317317
case <-done:
318318
_ = cn.Close()
319+
// Wait for the goroutine to finish and send something.
320+
<-errc
319321

320322
err = ctx.Err()
321323
return err

0 commit comments

Comments
 (0)