Bug in unreleased implementation of Server Discovery And Monitoring spec.
The spec requires a single-threaded scan to keep going until all nodes have been checked, including nodes discovered during the scan. But it seems that _mongoc_topology_do_blocking_scan quits once all servers known at the start of the scan are checked. Discovered nodes are added to the topology description, but not checked until the next scan.
I think mongoc_topology_scanner_add must call mongoc_async_cmd_new to schedule a check during the current scan, instead of deferring it to the next scan.
Impact: an initial server selection may take longer than necessary, or may fail when it could have succeeded. E.g., if the seed list contains only a secondary, the primary is discovered from the secondary's host list, but not checked until the next scan, 500 ms (minHeartbeatFrequencyMS) later.
If the new "serverSelectionTryOnce" is enabled in single-threaded mode, the selection actually fails in this scenario when it must succeed.