Skip to content

Commit 6b8a088

Browse files
committed
Review: clearer message comparison
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
1 parent 895ac4f commit 6b8a088

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/client/options_impl.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,11 @@ CommandLineOptionsPtr OptionsImpl::toCommandLineOptionsInternal() const {
672672
}
673673
}
674674

675-
// Only set the tls context if it looks non-empty, to avoid a warning being logged about field
676-
// deprecation. Ideally this would follow the way transport_socket uses absl::optional below.
675+
// Only set the tls context if needed, to avoid a warning being logged about field deprecation.
676+
// Ideally this would follow the way transport_socket uses absl::optional below.
677677
// But as this field is about to get eliminated this minimal effort shortcut may be more suitable.
678-
if (!Envoy::MessageUtil()(tls_context_,
679-
envoy::extensions::transport_sockets::tls::v3::UpstreamTlsContext())) {
678+
if (!Envoy::Protobuf::util::MessageDifferencer::Equivalent(
679+
tls_context_, envoy::extensions::transport_sockets::tls::v3::UpstreamTlsContext())) {
680680
*(command_line_options->mutable_tls_context()) = tls_context_;
681681
}
682682
if (transport_socket_.has_value()) {

0 commit comments

Comments
 (0)