We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94f8283 commit d149143Copy full SHA for d149143
uvloop/handles/stream.pyx
@@ -1002,7 +1002,12 @@ cdef void __uv_stream_buffered_on_read(
1002
return
1003
1004
try:
1005
- if nread > 0 and sc.__protocol_type != ProtocolType.SSL_PROTOCOL and not sc._read_pybuf_acquired:
+ # When our own SSLProtocol is used, we get buffer pointer directly,
1006
+ # through SSLProtocol.get_buffer_impl, not through Py_Buffer interface.
1007
+ # Therefore sc._read_pybuf_acquired is always False for SSLProtocol.
1008
+ if (nread > 0 and
1009
+ sc.__protocol_type == ProtocolType.BUFFERED and
1010
+ not sc._read_pybuf_acquired):
1011
# From libuv docs:
1012
# nread is > 0 if there is data available or < 0 on error. When
1013
# we’ve reached EOF, nread will be set to UV_EOF. When
0 commit comments