(self)
| 478 | self._moving_min.reset() |
| 479 | |
| 480 | async def _run(self) -> None: |
| 481 | try: |
| 482 | # NOTE: This thread is only run when using the streaming |
| 483 | # heartbeat protocol (MongoDB 4.4+). |
| 484 | # XXX: Skip check if the server is unknown? |
| 485 | rtt = await self._ping() |
| 486 | await self.add_sample(rtt) |
| 487 | except ReferenceError: |
| 488 | # Topology was garbage-collected. |
| 489 | await self.close() |
| 490 | except Exception: |
| 491 | await self._pool.reset() |
| 492 | |
| 493 | async def _ping(self) -> float: |
| 494 | """Run a "hello" command and return the RTT.""" |
nothing calls this directly
no test coverage detected