Skip to content

Commit ccd5e3c

Browse files
committed
Example fix
1 parent 198bbe6 commit ccd5e3c

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/server.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ fn handle_connection(mut stream: TcpStream, config: Arc<ServerConfig>) -> Result
8585
let mut connection = ServerConnection::new(config)?;
8686
let mut tls_stream = Stream::new(&mut connection, &mut stream);
8787

88-
// perform handshake early to get and dump some protocol information
89-
if tls_stream.conn.is_handshaking() {
90-
tls_stream.conn.complete_io(tls_stream.sock)?;
91-
}
88+
rustls_util::complete_io(tls_stream.sock, tls_stream.conn)?;
9289

9390
println!("Protocol version: {:?}", tls_stream.conn.protocol_version());
9491
println!("Cipher suite: {:?}", tls_stream.conn.negotiated_cipher_suite());

0 commit comments

Comments
 (0)