Skip to content

default httpc timeout if unset #94

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

Merged
merged 1 commit into from
Oct 11, 2021
Merged

default httpc timeout if unset #94

merged 1 commit into from
Oct 11, 2021

Conversation

peppelinux
Copy link
Member

fixes #93

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2021

Codecov Report

Merging #94 (f0a7a92) into main (58fc18c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   77.71%   77.72%   +0.01%     
==========================================
  Files          41       41              
  Lines        4316     4318       +2     
  Branches      835      836       +1     
==========================================
+ Hits         3354     3356       +2     
  Misses        701      701              
  Partials      261      261              
Impacted Files Coverage Δ
src/cryptojwt/key_issuer.py 81.25% <100.00%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58fc18c...f0a7a92. Read the comment docs.

@peppelinux peppelinux requested a review from jschlyter October 10, 2021 23:20
@peppelinux peppelinux force-pushed the peppelinux-patch-1 branch 2 times, most recently from 25f836f to f3febc6 Compare October 10, 2021 23:32
@@ -254,6 +255,8 @@ def __init__(
self.httpc = requests.request

self.httpc_params = httpc_params or {}
if not self.httpc_params.get("timeout"):
self.httpc_params["timeout"] = DEFAULT_HTTPC_TIMEOUT
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead or copy the same code all around probably it would be better to create a default httpc loader and use it in all the classes

@jschlyter jschlyter merged commit e6432b4 into main Oct 11, 2021
@@ -774,7 +774,7 @@ def test_localhost_url():

kb = issuer.find(url)
assert len(kb) == 1
assert kb[0].httpc_params == {"verify": False}
assert kb[0].httpc_params == {"timeout": 10, "verify": False}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops... That would be instead DEFAULT_HTTPC_TIMEOUT ...

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

Successfully merging this pull request may close these issues.

infinite http requests with endpoint that drops packets
3 participants