1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-01-22 06:45:56 +01:00

fix: ensure TCP connection is properly shut down when Session is dropped (#476)

* Ensure TCP connection is properly shut down when session is dropped

* Update CHANGELOG.md

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
Alex Wied 2024-12-29 11:57:56 -05:00 committed by GitHub
parent cd1b77134e
commit 98847b9279
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,8 @@
## Unreleased ## Unreleased
- Ensure TCP connection is properly shut down when session is dropped.
## 0.3.0 ## 0.3.0
- Add `AggregatedMessage[Stream]` types. - Add `AggregatedMessage[Stream]` types.

View File

@ -145,6 +145,10 @@ impl Stream for StreamingBody {
return Poll::Ready(Some(Ok(mem::take(&mut this.buf).freeze()))); return Poll::Ready(Some(Ok(mem::take(&mut this.buf).freeze())));
} }
if this.closing {
return Poll::Ready(None);
}
Poll::Pending Poll::Pending
} }
} }