Skip to content

Commit 3b9b83b

Browse files
jackcclaude
andcommitted
Update acquire-time expiry check to use atomic.Int64 wrapper
The acquire-time lifetimeDestroyCount increment added in cc7ddf3 still used the atomic.AddInt64 free function. PR #2563 converted the counter fields to the atomic.Int64 typed wrapper, so update this call site to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b7c0a32 commit 3b9b83b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pgxpool/pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ func (p *Pool) Acquire(ctx context.Context) (c *Conn, err error) {
621621
// pinging) on them. This enforces MaxConnLifetime at acquire time so that
622622
// a connection that expired while idle on a busy pool is not handed out.
623623
if p.isExpired(res) {
624-
atomic.AddInt64(&p.lifetimeDestroyCount, 1)
624+
p.lifetimeDestroyCount.Add(1)
625625
res.Destroy()
626626
continue
627627
}

0 commit comments

Comments
 (0)