Skip to content

Commit

Permalink
Another fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Mar 10, 2024
1 parent 7f5dca3 commit 8f232ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stream/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl IpStackTcpStream {
.send(stream.create_rev_packet(flags, TTL, None, Vec::new())?)
.map_err(|_| IpStackError::InvalidTcpPacket)?;
stream.tcb.change_state(TcpState::Closed);
stream.shutdown.ready();
}
Ok(stream)
}
Expand Down Expand Up @@ -282,6 +283,7 @@ impl AsyncRead for IpStackTcpStream {
self.packet_to_send =
Some(self.create_rev_packet(0, DROP_TTL, None, Vec::new())?);
self.tcb.change_state(TcpState::Closed);
self.shutdown.ready();
return Ready(Err(Error::from(ErrorKind::ConnectionReset)));
}
if matches!(
Expand Down

0 comments on commit 8f232ce

Please sign in to comment.