pnpnpn / timeout-decorator

Timeout decorator for Python
MIT License
628 stars 94 forks source link

Unexpected behaviour when used together with retry #85

Open starwander opened 6 months ago

starwander commented 6 months ago

@timeout(4) @retry(tries=6, delay=2) def retry_after_each_timeout():

time.sleep(5)

raise Exception

This code will raise a timeout exception after 4 seconds, not after 6 tries. Uncomment the sleep code make it behaviour right.