(ctx context.Context)
| 283 | } |
| 284 | |
| 285 | func (hm *Manager) retireMaintNotificationsConns(ctx context.Context) { |
| 286 | conns := hm.maintNotificationsConnSnapshot() |
| 287 | if len(conns) == 0 || hm.pool == nil { |
| 288 | return |
| 289 | } |
| 290 | |
| 291 | if retirer, ok := hm.pool.(pool.ConnRetirer); ok { |
| 292 | retirer.RetireConns(ctx, conns, pool.CloseReasonMaintNotificationsDisabled) |
| 293 | return |
| 294 | } |
| 295 | |
| 296 | for _, cn := range conns { |
| 297 | _ = hm.pool.CloseConn(ctx, cn, pool.CloseReasonMaintNotificationsDisabled, pool.MetricStateIdle) |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | // Close closes the manager. |
| 302 | func (hm *Manager) Close() error { |
no test coverage detected