Skip to content

Commit 69956ca

Browse files
committed
Remove unused ctx from connPool.tryGet
1 parent 5670f04 commit 69956ca

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (c *Client) PoolStats() PoolStats {
137137
func (c *Client) getConn(ctx context.Context) (*Pipeline, error) {
138138
c.initPool()
139139

140-
if conn, ok := c.pool.tryGet(ctx); ok {
140+
if conn, ok := c.pool.tryGet(); ok {
141141
return c.newResult(conn), nil
142142
}
143143

conn.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package redjet
22

33
import (
44
"bufio"
5-
"context"
65
"net"
76
"sync"
87
"sync/atomic"
@@ -97,7 +96,7 @@ func (p *connPool) cleanLoop() {
9796

9897
// tryGet tries to get a connection from the pool. If there are no free
9998
// connections, it returns false.
100-
func (p *connPool) tryGet(ctx context.Context) (*conn, bool) {
99+
func (p *connPool) tryGet() (*conn, bool) {
101100
p.cleanMu.Lock()
102101
defer p.cleanMu.Unlock()
103102

0 commit comments

Comments
 (0)