Skip to content

Commit

Permalink
fix: ensure TCP connection is properly shut down when Session is drop…
Browse files Browse the repository at this point in the history
…ped (#476)

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

* Update CHANGELOG.md

---------

Co-authored-by: Rob Ede <[email protected]>
  • Loading branch information
centromere and robjtede authored Dec 29, 2024
1 parent cd1b771 commit 98847b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actix-ws/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Ensure TCP connection is properly shut down when session is dropped.

## 0.3.0

- Add `AggregatedMessage[Stream]` types.
Expand Down
4 changes: 4 additions & 0 deletions actix-ws/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ impl Stream for StreamingBody {
return Poll::Ready(Some(Ok(mem::take(&mut this.buf).freeze())));
}

if this.closing {
return Poll::Ready(None);
}

Poll::Pending
}
}
Expand Down

0 comments on commit 98847b9

Please sign in to comment.