(conns, chosen)
| 1235 | finally: |
| 1236 | |
| 1237 | async def _close_candidates(conns, chosen): |
| 1238 | await asyncio.gather( |
| 1239 | *(c.close() for c in conns if c is not chosen), |
| 1240 | return_exceptions=True |
| 1241 | ) |
| 1242 | if candidates: |
| 1243 | asyncio.create_task( |
| 1244 | _close_candidates(candidates, chosen_connection)) |