Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed an issue with the lib, if my http client initially failed, it would never work from that point forward until the process was restarted.
This is an issue with the "AsynceCacheControl" lib, because it is waiting for a failed request to finish and that will never happen, however this lib could easily prevent this from happening with this PR.
To reproduce what I was seeing, in a docker container I removed the default gateway (disconnected from the internet) and attempted to verify a jwt. It fails, as it should because it cannot connect to the host. However, each subsequent failure is a "Timeout" failure, which originates here (https://github.com/MasterSergius/acachecontrol/blob/master/src/acachecontrol/cache.py#L131).
This is because cache contains this request, it doesn't even attempt the http call again because its waiting for the failed one to finish.
So even after the internet is reestablished it will not move passed the timeout issue until the process is restarted.
Hope this helps, and thanks for the lib!
Thanks!