Skip to content

Commit

Permalink
minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Dec 14, 2023
1 parent 89951dd commit 6cd38fe
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions x/mongo/driver/topology/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1319,8 +1319,6 @@ func compact(arr []*connection) []*connection {
type wantConn struct {
ready chan struct{}

connOpts []ConnectionOption

mu sync.Mutex // Guards conn, err
conn *connection
err error
Expand Down Expand Up @@ -1357,7 +1355,6 @@ func (w *wantConn) tryDeliver(conn *connection, err error) bool {
panic("x/mongo/driver/topology: internal error: misuse of tryDeliver")
}

w.connOpts = w.connOpts[:0]
close(w.ready)

return true
Expand All @@ -1373,7 +1370,6 @@ func (w *wantConn) cancel(p *pool, err error) {

w.mu.Lock()
if w.conn == nil && w.err == nil {
w.connOpts = w.connOpts[:0]
close(w.ready) // catch misbehavior in future delivery
}
conn := w.conn
Expand Down

0 comments on commit 6cd38fe

Please sign in to comment.