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

Added explanation why the timeout is doubled.(#5773) #5776

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/user/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1076,3 +1076,6 @@ coffee.
r = requests.get('https://github.com', timeout=None)

.. _`connect()`: https://linux.die.net/man/2/connect

If the client supports IPv6 (AAAA record) and the specified domain has multiple IP addresses, `urllib3`_ will continue to try another IP addresses (such as IPv6) if they reach the specified connection timeout.
This phenomenon can actually wait for a larger or multiplied time, ignoring the connection timeout. You may consider an extreme solution, such as ensuring that the domain name you specify returns one IP Address (which prevents it from returning IPv6). However, it can cause new issues.