Skip to content

Commit

Permalink
attempting to fix Envoy-Mobile issue
Browse files Browse the repository at this point in the history
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
  • Loading branch information
adisuissa committed May 9, 2024
1 parent bc971f3 commit a80f5ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/common/protobuf/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,13 @@ class DurationFieldProtoVisitor : public ProtobufMessage::ConstProtoVisitor {
const Protobuf::ReflectableMessage reflectable_message = createReflectableMessage(message);
if (reflectable_message->GetDescriptor()->full_name() == "google.protobuf.Duration") {
ProtobufWkt::Duration duration_message;
#if defined(ENVOY_ENABLE_FULL_PROTOS)
duration_message.MergeFrom(message);
#else
if (!duration_message.ParseFromString(message.value())) {
throwEnvoyExceptionOrPanic(fmt::format("Unable to parse duration: {}", message.value()));
}
#endif
// Validate the value of the duration.
absl::Status status = validateDurationUnifiedNoThrow(duration_message);
if (!status.ok()) {
Expand Down

0 comments on commit a80f5ba

Please sign in to comment.