We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9539876 commit 4b42383Copy full SHA for 4b42383
intra/core/connpool.go
@@ -223,10 +223,11 @@ func (c *ConnPool[T]) clean() {
223
}
224
225
func (c *ConnPool[T]) scrub() {
226
- if c.closed.Load() {
227
- return
228
- }
229
for {
+ if c.closed.Load() {
+ return
+ }
230
+
231
select {
232
case conn := <-c.p:
233
if readable(conn) {
@@ -242,6 +243,7 @@ func (c *ConnPool[T]) scrub() {
242
243
clos(conn)
244
245
case <-c.ctx.Done():
246
247
default:
248
return
249
0 commit comments