Skip to content
Browse files

Remove httpclient max_simultaneous_connections argument.

This argument doesn't do anything in modern versions of libcurl,
and is confusingly similar to max_clients.
  • Loading branch information...
1 parent 91b7c47 commit 6385cfaa2b2c741082ea6ba82ebaf63db83bba78 @bdarnell bdarnell committed
Showing with 7 additions and 12 deletions.
  1. +3 −6 tornado/curl_httpclient.py
  2. +4 −6 tornado/simple_httpclient.py
View
9 tornado/curl_httpclient.py
@@ -34,14 +34,12 @@
class CurlAsyncHTTPClient(AsyncHTTPClient):
- def initialize(self, io_loop=None, max_clients=10,
- max_simultaneous_connections=None):
+ def initialize(self, io_loop=None, max_clients=10):
self.io_loop = io_loop
self._multi = pycurl.CurlMulti()
self._multi.setopt(pycurl.M_TIMERFUNCTION, self._set_timeout)
self._multi.setopt(pycurl.M_SOCKETFUNCTION, self._handle_socket)
- self._curls = [_curl_create(max_simultaneous_connections)
- for i in xrange(max_clients)]
+ self._curls = [_curl_create() for i in xrange(max_clients)]
self._free_list = self._curls[:]
self._requests = collections.deque()
self._fds = {}
@@ -263,12 +261,11 @@ def __init__(self, errno, message):
self.errno = errno
-def _curl_create(max_simultaneous_connections=None):
+def _curl_create():
curl = pycurl.Curl()
if logging.getLogger().isEnabledFor(logging.DEBUG):
curl.setopt(pycurl.VERBOSE, 1)
curl.setopt(pycurl.DEBUGFUNCTION, _curl_debug)
- curl.setopt(pycurl.MAXCONNECTS, max_simultaneous_connections or 5)
return curl
View
10 tornado/simple_httpclient.py
@@ -61,7 +61,6 @@ class SimpleAsyncHTTPClient(AsyncHTTPClient):
"""
def initialize(self, io_loop=None, max_clients=10,
- max_simultaneous_connections=None,
hostname_mapping=None, max_buffer_size=104857600):
"""Creates a AsyncHTTPClient.
@@ -69,11 +68,10 @@ def initialize(self, io_loop=None, max_clients=10,
in order to provide limitations on the number of pending connections.
force_instance=True may be used to suppress this behavior.
- max_clients is the number of concurrent requests that can be in
- progress. max_simultaneous_connections has no effect and is accepted
- only for compatibility with the curl-based AsyncHTTPClient. Note
- that these arguments are only used when the client is first created,
- and will be ignored when an existing client is reused.
+ max_clients is the number of concurrent requests that can be
+ in progress. Note that this arguments are only used when the
+ client is first created, and will be ignored when an existing
+ client is reused.
hostname_mapping is a dictionary mapping hostnames to IP addresses.
It can be used to make local DNS changes when modifying system-wide

0 comments on commit 6385cfa

Please sign in to comment.
Something went wrong with that request. Please try again.