@@ -40,7 +40,8 @@ class Client(
4040 api .VolumeApiMixin ):
4141 def __init__ (self , base_url = None , version = None ,
4242 timeout = constants .DEFAULT_TIMEOUT_SECONDS , tls = False ,
43- user_agent = constants .DEFAULT_USER_AGENT ):
43+ user_agent = constants .DEFAULT_USER_AGENT ,
44+ num_pools = constants .DEFAULT_NUM_POOLS ):
4445 super (Client , self ).__init__ ()
4546
4647 if tls and not base_url :
@@ -58,7 +59,9 @@ def __init__(self, base_url=None, version=None,
5859 base_url , constants .IS_WINDOWS_PLATFORM , tls = bool (tls )
5960 )
6061 if base_url .startswith ('http+unix://' ):
61- self ._custom_adapter = UnixAdapter (base_url , timeout )
62+ self ._custom_adapter = UnixAdapter (
63+ base_url , timeout , num_pools = num_pools
64+ )
6265 self .mount ('http+docker://' , self ._custom_adapter )
6366 self ._unmount ('http://' , 'https://' )
6467 self .base_url = 'http+docker://localunixsocket'
@@ -68,7 +71,9 @@ def __init__(self, base_url=None, version=None,
6871 'The npipe:// protocol is only supported on Windows'
6972 )
7073 try :
71- self ._custom_adapter = NpipeAdapter (base_url , timeout )
74+ self ._custom_adapter = NpipeAdapter (
75+ base_url , timeout , num_pools = num_pools
76+ )
7277 except NameError :
7378 raise errors .DockerException (
7479 'Install pypiwin32 package to enable npipe:// support'
@@ -80,7 +85,9 @@ def __init__(self, base_url=None, version=None,
8085 if isinstance (tls , TLSConfig ):
8186 tls .configure_client (self )
8287 elif tls :
83- self ._custom_adapter = ssladapter .SSLAdapter ()
88+ self ._custom_adapter = ssladapter .SSLAdapter (
89+ num_pools = num_pools
90+ )
8491 self .mount ('https://' , self ._custom_adapter )
8592 self .base_url = base_url
8693
0 commit comments