The srv.txt file is not guaranteed to be ready and can throw a fatal index oob exception without an immediately clear reason. Even sleep(4) wasn't enough on every hardware. This is more responsive and avoids guesswork with the timing.
Side note: I tried a "simpler" synchronous version as well of course and they perform the same. But using colab's async loop is better in general for future additions.
The srv.txt file is not guaranteed to be ready and can throw a fatal index oob exception without an immediately clear reason. Even
sleep(4)
wasn't enough on every hardware. This is more responsive and avoids guesswork with the timing.Side note: I tried a "simpler" synchronous version as well of course and they perform the same. But using colab's async loop is better in general for future additions.