◐ Shell
clean mode source ↗

Fix SSL read over-consuming TCP data and ZeroReturn handling by youknowone · Pull Request #7418 · RustPython/RustPython

@youknowone marked this pull request as ready for review

March 13, 2026 03:37

coderabbitai[bot]

coderabbitai[bot]

Use single-record reading (recv_one_tls_record) for all SSL
reads, not just handshake. This prevents rustls from eagerly
consuming close_notify alongside application data, which left
the TCP buffer empty and caused select()-based servers to miss
readability and time out.

Also fix recv_one_tls_record to return Eof (not WantRead) when
peek returns empty bytes, since empty peek means the peer has
closed the TCP connection.

coderabbitai[bot]

coderabbitai[bot]

youknowone added a commit to youknowone/RustPython that referenced this pull request

Mar 19, 2026
Use single-record reading (recv_one_tls_record) for all SSL
reads, not just handshake. This prevents rustls from eagerly
consuming close_notify alongside application data, which left
the TCP buffer empty and caused select()-based servers to miss
readability and time out.

Also fix recv_one_tls_record to return Eof (not WantRead) when
peek returns empty bytes, since empty peek means the peer has
closed the TCP connection.

youknowone added a commit to youknowone/RustPython that referenced this pull request

Mar 22, 2026
Use single-record reading (recv_one_tls_record) for all SSL
reads, not just handshake. This prevents rustls from eagerly
consuming close_notify alongside application data, which left
the TCP buffer empty and caused select()-based servers to miss
readability and time out.

Also fix recv_one_tls_record to return Eof (not WantRead) when
peek returns empty bytes, since empty peek means the peer has
closed the TCP connection.

@im-0 im-0 mentioned this pull request

May 17, 2026