(ctx context.Context, cn *Conn, reason error)
| 114 | } |
| 115 | |
| 116 | func (p *StickyConnPool) Remove(ctx context.Context, cn *Conn, reason error) { |
| 117 | defer func() { |
| 118 | if recover() != nil { |
| 119 | p.pool.Remove(ctx, cn, ErrClosed) |
| 120 | } |
| 121 | }() |
| 122 | p._badConnError.Store(BadConnError{wrapped: reason}) |
| 123 | p.ch <- cn |
| 124 | } |
| 125 | |
| 126 | // RemoveWithoutTurn has the same behavior as Remove for StickyConnPool |
| 127 | // since StickyConnPool doesn't use a turn-based queue system. |
no test coverage detected