Closed kdart closed 6 years ago
Interesting. This is probably something extremely minor (like a bounds check). Will take a quick look.
Just pushed a fix for this. A test that included the bounds check wasn't written in the right order.
Cool, fixed it. :-)
When using the timeout_after wrapper with a large timeout value you'll get an IndexError.
Here's a little test program:
When run like this, it works: ~/tmp ⇒ python3.6 curio_timeout_bug.py 15 sleeping 10.0 seconds.
Or, like this, you get the expected TaskTimeout error. ~/tmp ⇒ python3.6 curio_timeout_bug.py 5
But with some larger number, an IndexError when coro ends: ~/tmp ⇒ python3.6 curio_timeout_bug.py 32000 sleeping 10.0 seconds.