@@ -1930,31 +1930,23 @@ cdef class Loop:
1930
1930
raise ValueError (' invalid socket type, SOCK_STREAM expected' )
1931
1931
1932
1932
fileno = sock.fileno()
1933
- protocol = protocol_factory()
1933
+ app_protocol = protocol_factory()
1934
1934
waiter = self ._new_future()
1935
1935
1936
1936
if ssl is None :
1937
- if sock.family == uv.AF_UNIX:
1938
- transport = < UVStream> UnixTransport.new(
1939
- self , protocol, None , waiter)
1940
-
1941
- elif sock.family in (uv.AF_INET, uv.AF_INET6):
1942
- transport = < UVStream> TCPTransport.new(
1943
- self , protocol, None , waiter)
1944
-
1937
+ protocol = app_protocol
1945
1938
else :
1946
- ssl_protocol = aio_SSLProtocol(
1947
- self , protocol , ssl, waiter,
1939
+ protocol = aio_SSLProtocol(
1940
+ self , app_protocol , ssl, waiter,
1948
1941
True , # server_side
1949
1942
None ) # server_hostname
1950
1943
1951
- if sock.family == uv.AF_UNIX:
1952
- transport = < UVStream> UnixTransport.new(
1953
- self , ssl_protocol, None , None )
1954
-
1955
- elif sock.family in (uv.AF_INET, uv.AF_INET6):
1956
- transport = < UVStream> TCPTransport.new(
1957
- self , ssl_protocol, None , None )
1944
+ if sock.family == uv.AF_UNIX:
1945
+ transport = < UVStream> UnixTransport.new(
1946
+ self , protocol, None , waiter)
1947
+ elif sock.family in (uv.AF_INET, uv.AF_INET6):
1948
+ transport = < UVStream> TCPTransport.new(
1949
+ self , protocol, None , waiter)
1958
1950
1959
1951
if transport is None :
1960
1952
raise ValueError (
0 commit comments