File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -1617,17 +1617,15 @@ cdef class Loop:
16171617 call_connection_made = False )
16181618
16191619 # Transfer buffered data from the old protocol to the new one.
1620- if not hasattr (protocol, ' _stream_reader' ):
1621- return
1622-
1623- stream_reader = protocol._stream_reader
1624- if stream_reader is None :
1625- return
1626-
1627- buffer = stream_reader._buffer
1628- if buffer :
1629- ssl_protocol._incoming.write(buffer )
1630- buffer .clear()
1620+ stream_buff = None
1621+ if hasattr (protocol, ' _stream_reader' ):
1622+ stream_reader = protocol._stream_reader
1623+ if stream_reader is not None :
1624+ stream_buff = getattr (stream_reader, ' _buffer' , None )
1625+
1626+ if stream_buff is not None :
1627+ ssl_protocol._incoming.write(stream_buff)
1628+ stream_buff.clear()
16311629
16321630 # Pause early so that "ssl_protocol.data_received()" doesn't
16331631 # have a chance to get called before "ssl_protocol.connection_made()".
You can’t perform that action at this time.
0 commit comments