@@ -281,19 +281,19 @@ def factory() -> ClientConnection:
281281
282282 loop = asyncio .get_running_loop ()
283283 if kwargs .pop ("unix" , False ):
284- self ._create_connection = loop .create_unix_connection (factory , ** kwargs )
284+ self .create_connection = loop .create_unix_connection (factory , ** kwargs )
285285 else :
286286 if kwargs .get ("sock" ) is None :
287287 kwargs .setdefault ("host" , wsuri .host )
288288 kwargs .setdefault ("port" , wsuri .port )
289- self ._create_connection = loop .create_connection (factory , ** kwargs )
289+ self .create_connection = loop .create_connection (factory , ** kwargs )
290290
291- self ._handshake_args = (
291+ self .handshake_args = (
292292 additional_headers ,
293293 user_agent_header ,
294294 )
295295
296- self ._open_timeout = open_timeout
296+ self .open_timeout = open_timeout
297297
298298 # ... = await connect(...)
299299
@@ -303,10 +303,10 @@ def __await__(self) -> Generator[Any, None, ClientConnection]:
303303
304304 async def __await_impl__ (self ) -> ClientConnection :
305305 try :
306- async with asyncio_timeout (self ._open_timeout ):
307- _transport , self .connection = await self ._create_connection
306+ async with asyncio_timeout (self .open_timeout ):
307+ _transport , self .connection = await self .create_connection
308308 try :
309- await self .connection .handshake (* self ._handshake_args )
309+ await self .connection .handshake (* self .handshake_args )
310310 except (Exception , asyncio .CancelledError ):
311311 self .connection .transport .close ()
312312 raise
0 commit comments