Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions internal/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,16 @@
default:
}

start := time.Now()
defer func() {
if c, found := ctx.Value("connectionQueueTimes").(chan<- time.Duration); found {
select {
case c <- time.Since(start):
default: // prevent a full buffer from freezing the application
}
}
}()

select {
case p.queue <- struct{}{}:
return nil
Expand All @@ -323,7 +333,7 @@
timer := timers.Get().(*time.Timer)
timer.Reset(p.cfg.PoolTimeout)

select {

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / build (1.24.x, 7.4.2-54)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / test-redis-ce (8.0.1, 1.23.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / test-redis-ce (7.4.2, 1.23.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / benchmark (8.0.1, 1.24.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / test-redis-ce (8.0.1, 1.24.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / benchmark (7.4.2, 1.23.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / test-redis-ce (7.4.2, 1.24.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / test-redis-ce (7.2.7, 1.23.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / benchmark (8.0.1, 1.23.x)

no new variables on left side of :=

Check failure on line 336 in internal/pool/pool.go

View workflow job for this annotation

GitHub Actions / benchmark (7.4.2, 1.24.x)

no new variables on left side of :=
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
Expand Down
Loading