(conn: PyMongoProtocol, buf: bytes)
| 685 | |
| 686 | |
| 687 | async def async_sendall(conn: PyMongoProtocol, buf: bytes) -> None: |
| 688 | try: |
| 689 | await asyncio.wait_for(conn.write(buf), timeout=conn.gettimeout) |
| 690 | except asyncio.TimeoutError as exc: |
| 691 | # Convert the asyncio.wait_for timeout error to socket.timeout which pool.py understands. |
| 692 | raise socket.timeout("timed out") from exc |
| 693 | |
| 694 | |
| 695 | async def async_receive_message( |
no test coverage detected