Could we get some comments in this function?  Namely that second loop confuses be because:

1. It seems a connection will get a maximum ready count of 1 no matter what max_in_flight is
2. It seems we are still setting `RDY=1` for idle connections we just gave up on in the previous loop.