Title: Fix SSL read over-consuming TCP data and ZeroReturn handling by youknowone · Pull Request #7418 · RustPython/RustPython · GitHub
Open Graph Title: Fix SSL read over-consuming TCP data and ZeroReturn handling by youknowone · Pull Request #7418 · RustPython/RustPython
X Title: Fix SSL read over-consuming TCP data and ZeroReturn handling by youknowone · Pull Request #7418 · RustPython/RustPython
Description: 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 ZeroReturn to raise SSLEOFError when shutdown has not started, so suppress_ragged_eofs=True can suppress it properly. Summary by CodeRabbit Bug Fixes Simplified SSL/TLS shutdown behavior: peers sending close_notify now result in an immediate empty read (EOF) instead of raising a special exception, reducing ambiguous shutdown outcomes. Refactor TLS record reading reworked to enforce single-record boundaries, avoid draining control records with application data, and maintain correct EOF/select()/non-blocking semantics.
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/RustPython/RustPython/pull/7418
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3e7d9465-8420-0c9d-21f9-b3b20b6ca6c6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A3D4:355854:1D531D6:2854F79:6A5DE666 |
| html-safe-nonce | 6c6f22c692bfb5552685c5910a6a3846988014abfac9f4d90d1a40e8eed2e332 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0Q0OjM1NTg1NDoxRDUzMUQ2OjI4NTRGNzk6NkE1REU2NjYiLCJ2aXNpdG9yX2lkIjoiNzE4NzQ1Mjk0OTI5MTcyMjM0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 22e7bcfce1adab1b96f2992132b6867a8d2e2e032e14075ed0991c013a0e3380 |
| hovercard-subject-tag | pull_request:3392892722 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/7418/files |
| twitter:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f068985268f2a1e272fe40dd37a3352a16d337d57ec570e56da6c2346e179f59 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e36408244bcd0ded36f1cfba5db8e97f99c2117e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width