FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix eof_received by dennissheng · Pull Request #661 · MagicStack/uvloop · GitHub

fix eof_received - #661

Open
dennissheng wants to merge 1 commit into
MagicStack:masterfrom
dennissheng:master
Open

fix eof_received#661
dennissheng wants to merge 1 commit into
MagicStack:masterfrom
dennissheng:master

Conversation

dennissheng commented Mar 22, 2025
edited
Loading

Copy link
Copy Markdown

I think it's not right to shutdown when eof received. It's better to wait for app resume when app reading paused. I wrote a test case(test_close_notify.py) for this situation. The server first sends 1024 * 50 bytes to client, then sends 7 bytes. The client reads the first payload(1024 * 50) then pauses reading and handles the payload in 3 seconds. After that the client resumes reading. So the client should totally receive 1024 * 50 + 7 bytes, not just 1024 * 50 bytes.

Even when there are no app reading pause, reading from buffer is needed before shutdown, cause sometimes ssl eof is in the same package of tcp fin. So when connection is closing, reading buffer is still needed to parse the EOF alert message in this package.

1st1 requested a review from fantix April 16, 2025 17:20

1st1 commented Apr 16, 2025

Copy link
Copy Markdown
Member

@fantix this is your area of expertise :)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL