(stream: asyncio.StreamWriter)
| 43 | |
| 44 | |
| 45 | async def wait_closed(stream: asyncio.StreamWriter) -> None: |
| 46 | # Not all asyncio versions have StreamWriter.wait_closed(). |
| 47 | if hasattr(stream, 'wait_closed'): |
| 48 | try: |
| 49 | await stream.wait_closed() |
| 50 | except ConnectionResetError: |
| 51 | # On Windows wait_closed() sometimes propagates |
| 52 | # ConnectionResetError which is totally unnecessary. |
| 53 | pass |
| 54 | |
| 55 | |
| 56 | if sys.version_info < (3, 12): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…