Skip to content

Commit

Permalink
Fix the block when invalid packet received
Browse files Browse the repository at this point in the history
  • Loading branch information
SajjadPourali committed Mar 28, 2024
1 parent 0999c7a commit 2d94496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ impl Drop for IpStackTcpStream {
fn drop(&mut self) {
task::block_in_place(move || {
Handle::current().block_on(async move {
if !matches!(self.tcb.get_state(), TcpState::SynReceived(false)) {
if matches!(self.tcb.get_state(), TcpState::Established) {
_ = self.shutdown().await;
}

Expand Down

0 comments on commit 2d94496

Please sign in to comment.