Skip to content

Commit

Permalink
Merge pull request #51 from cea-sec/dependabot/cargo/tls-listener-0.8.0
Browse files Browse the repository at this point in the history
Bump tls-listener from 0.7.0 to 0.8.0
  • Loading branch information
vruello authored Oct 25, 2023
2 parents e0cb06f + f87382f commit ba08cd3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ futures = "0.3.28"
bitreader = "0.3.7"
rustls = "0.21.6"
rustls-pemfile = "1.0.3"
tls-listener = { version = "0.7.0", features = ["hyper-h2", "rustls"] }
tls-listener = { version = "0.8.0", features = ["hyper-h2", "rustls"] }
tokio-rustls = "0.24.1"
x509-parser = "0.15.1"
sha1 = "0.10.5"
Expand Down
9 changes: 6 additions & 3 deletions server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,17 @@ fn create_tls_server(
tls_acceptor,
AddrIncoming::bind(&addr).expect("Could not bind address to listener"),
)
.connections()
.filter(|conn| {
if let Err(err) = &conn {
match err {
tls_listener::Error::TlsAcceptError(e) if e.to_string() == "tls handshake eof" => {
tls_listener::Error::TlsAcceptError { error, .. }
if error.to_string() == "tls handshake eof" =>
{
// happens sometimes, not problematic
debug!("Error while establishing a connection : {:?}", err)
debug!("Error while establishing a connection: {:?}", err)
}
_ => warn!("Error while establishing a connection : {:?}", err),
_ => warn!("Error while establishing a connection: {:?}", err),
};
ready(false)
} else {
Expand Down

0 comments on commit ba08cd3

Please sign in to comment.