Skip to content

Commit c764368

Browse files
committed
fix test race
Signed-off-by: monkey92t <[email protected]>
1 parent 6f383d8 commit c764368

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/pool/export_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ func (cn *Conn) NetConn() net.Conn {
1414
}
1515

1616
func (p *ConnPool) CheckMinIdleConns() {
17+
p.connsMu.Lock()
1718
p.checkMinIdleConns()
19+
p.connsMu.Unlock()
1820
}
1921

2022
func (p *ConnPool) QueueLen() int {

0 commit comments

Comments
 (0)