Skip to content

Commit

Permalink
Ensure TCP connection is properly shut down when session is dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
centromere committed Nov 1, 2024
1 parent 77406cb commit c8d9d06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions actix-ws/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Ensure TCP connection is properly shut down when session is dropped

## 0.3.0

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 c8d9d06

Please sign in to comment.