Skip to content

Commit

Permalink
Remove extra logic that is now unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Apr 26, 2024
1 parent 5fc75d4 commit cfd1b09
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ where
Err(err) => return Poll::Ready(Err(err)),
};

let stats = self.session.process_new_packets().map_err(|err| {
self.session.process_new_packets().map_err(|err| {
// In case we have an alert to send describing this error,
// try a last-gasp write -- but don't predate the primary
// error.
Expand All @@ -107,13 +107,6 @@ where
io::Error::new(io::ErrorKind::InvalidData, err)
})?;

if stats.peer_has_closed() && self.session.is_handshaking() {
return Poll::Ready(Err(io::Error::new(
io::ErrorKind::UnexpectedEof,
"tls handshake alert",
)));
}

Poll::Ready(Ok(n))
}

Expand Down

0 comments on commit cfd1b09

Please sign in to comment.