Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request timeout is not honored #265

Open
mickyhale opened this issue Feb 4, 2024 · 1 comment
Open

Request timeout is not honored #265

mickyhale opened this issue Feb 4, 2024 · 1 comment
Assignees

Comments

@mickyhale
Copy link

I was attempting to adjust request timeout to 40 which I believed would affect all call methods in CvpApi, but it wasn't working for get_configlets_and_mappers().

Debug snippet from my app:

...
[cvprac] get_configlets_and_mappers: getConfigletsAndAssociatedMappers
[cvprac] HTTPSConnectionPool(host='some.host', port=443): Read timed out. (read timeout=30)
...

I took a look at the code and saw that timeout wasn't set for that call. That would be a simple enough fix but then I looked at how request_timeout is being passed and it seems like it should be an attribute set in CvpClient (instead of CvpApi). It could happen either in the connect call where connect_timeout is set or during instantiation (exposing both timeouts to the user prior to connect might be nice).

I was going to submit a pull request with the proposed change, but thought I might bring it up first in case I'm missing the reasoning behind how it's configured and because the change that I'm suggesting isn't entirely trivial.

Thank you for the library.

@mickyhale mickyhale changed the title Request timeout handling is confusing Request timeout is not honored Feb 5, 2024
@mharista mharista self-assigned this Feb 14, 2024
@mharista
Copy link
Contributor

Thanks @mickyhale

I'll take a look at this and try to get it addressed before the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants