@@ -115,6 +115,7 @@ async def connect(self):
115115 ** self ._connect_kwargs )
116116 self ._pool ._working_addr = con ._addr
117117 self ._pool ._working_opts = con ._opts
118+ self ._pool ._working_ssl_context = con ._ssl_context
118119
119120 else :
120121 # We've connected before and have a resolved address
@@ -126,9 +127,10 @@ async def connect(self):
126127 else :
127128 host , port = self ._pool ._working_addr
128129
129- con = await self ._pool ._connect (host = host , port = port ,
130- loop = self ._pool ._loop ,
131- ** self ._pool ._working_opts )
130+ con = await self ._pool ._connect (
131+ host = host , port = port , loop = self ._pool ._loop ,
132+ ssl = self ._pool ._working_ssl_context ,
133+ ** self ._pool ._working_opts )
132134
133135 if self ._init is not None :
134136 await self ._init (con )
@@ -248,7 +250,7 @@ class Pool:
248250 """
249251
250252 __slots__ = ('_queue' , '_loop' , '_minsize' , '_maxsize' ,
251- '_working_addr' , '_working_opts' ,
253+ '_working_addr' , '_working_opts' , '_working_ssl_context' ,
252254 '_holders' , '_initialized' , '_closed' )
253255
254256 def __init__ (self , * connect_args ,
@@ -292,6 +294,7 @@ def __init__(self, *connect_args,
292294
293295 self ._working_addr = None
294296 self ._working_opts = None
297+ self ._working_ssl_context = None
295298
296299 self ._closed = False
297300
0 commit comments