mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
aquatic_http network: avoid infinite loop case; minor other changes
This commit is contained in:
parent
656efc7d4e
commit
8ebfb1d0ce
2 changed files with 17 additions and 13 deletions
|
|
@ -170,6 +170,8 @@ impl <'a>TlsHandshakeMachine {
|
|||
Stream::TlsStream(stream)
|
||||
);
|
||||
|
||||
::log::debug!("established tcp connection");
|
||||
|
||||
Ok(established)
|
||||
},
|
||||
Err(native_tls::HandshakeError::WouldBlock(handshake)) => {
|
||||
|
|
@ -217,6 +219,8 @@ impl Connection {
|
|||
TlsHandshakeMachine::new(tls_acceptor.clone(), tcp_stream)
|
||||
)
|
||||
} else {
|
||||
::log::debug!("established tcp connection");
|
||||
|
||||
ConnectionInner::Established(
|
||||
EstablishedConnection::new(Stream::TcpStream(tcp_stream))
|
||||
)
|
||||
|
|
@ -259,6 +263,7 @@ impl Connection {
|
|||
}
|
||||
}
|
||||
|
||||
/// Takes ownership since TlsStream needs ownership of TcpStream
|
||||
#[inline]
|
||||
pub fn get_in_progress(self) -> Option<TlsHandshakeMachine> {
|
||||
if let ConnectionInner::InProgress(machine) = self.inner {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue