Skip to content

if no more data, set receive_eof to True#79

Merged
abersheeran merged 1 commit intoabersheeran:masterfrom
wenxuwan:fix_starlette_middleware
Jun 17, 2025
Merged

if no more data, set receive_eof to True#79
abersheeran merged 1 commit intoabersheeran:masterfrom
wenxuwan:fix_starlette_middleware

Conversation

@wenxuwan
Copy link
Copy Markdown
Contributor

image

@wenxuwan
Copy link
Copy Markdown
Contributor Author

@abersheeran please help review this pr

@abersheeran
Copy link
Copy Markdown
Owner

Does this PR solve any problem?

@wenxuwan
Copy link
Copy Markdown
Contributor Author

wenxuwan commented Jun 17, 2025

Does this PR solve any problem?

yes, When use starlette's middleware capability, if read all the data for the first time, the middleware's wrapped_receive goes into the _wrapped_rcv_consumed state and waits to accept the “http.disconnect” If it receives something other than “http.disconnect”, it throws the exception “Unexpected message received:”. just like this:

image

image

@abersheeran abersheeran merged commit eb2a70c into abersheeran:master Jun 17, 2025
16 checks passed
@wenxuwan
Copy link
Copy Markdown
Contributor Author

@abersheeran hi abersheeran, can you help release v1.10.10?

@abersheeran
Copy link
Copy Markdown
Owner

OK, v1.10.10 has released.

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