From e9a1e35f8989691afe99407d9b65a67684aa8bac Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Fri, 3 Jul 2015 17:00:38 +0100 Subject: [PATCH] Only pass useful timeouts to _get_conn --- requests/adapters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requests/adapters.py b/requests/adapters.py index edc1af68..841cbbfe 100644 --- a/requests/adapters.py +++ b/requests/adapters.py @@ -35,6 +35,7 @@ from .auth import _basic_auth_str DEFAULT_POOLBLOCK = False DEFAULT_POOLSIZE = 10 DEFAULT_RETRIES = 0 +DEFAULT_POOL_TIMEOUT = None class BaseAdapter(object): @@ -375,7 +376,7 @@ class HTTPAdapter(BaseAdapter): if hasattr(conn, 'proxy_pool'): conn = conn.proxy_pool - low_conn = conn._get_conn(timeout=timeout) + low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) try: low_conn.putrequest(request.method,