Skip to content

Commit

Permalink
more formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anil-db committed Oct 17, 2023
1 parent cda4ea9 commit eac6638
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/vector-core/src/tls/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,15 @@ impl TlsSettings {
}

if let Some(alpn) = &self.alpn_protocols {
if !for_server {
context
.set_alpn_protos(alpn.as_slice())
.context(SetAlpnProtocolsSnafu)?;
} else {
if for_server {
let server_proto = alpn.clone();
context.set_alpn_select_callback(move |_, client_proto| {
select_next_proto(server_proto.as_slice(), client_proto).ok_or(AlpnError::NOACK)
})
});
} else {
context
.set_alpn_protos(alpn.as_slice())
.context(SetAlpnProtocolsSnafu)?;
}
}

Expand Down

0 comments on commit eac6638

Please sign in to comment.