Skip to content

Commit 1bbefef

Browse files
authored
add fallthrough on symbol detection due to reported crashes (#64)
1 parent cc0ac8a commit 1bbefef

File tree

1 file changed

+7
-1
lines changed
  • lib/grpc_reflection/service/builder

1 file changed

+7
-1
lines changed

lib/grpc_reflection/service/builder/util.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,13 @@ defmodule GrpcReflection.Service.Builder.Util do
153153
|> Enum.map(&String.trim_leading(&1, "."))
154154
end
155155

156-
def types_from_descriptor(%Google.Protobuf.EnumDescriptorProto{}) do
156+
# Additional types we don't expect references in
157+
# Google.Protobuf.EnumDescriptorProto
158+
# Google.Protobuf.EnumValueDescriptorProto
159+
# Google.Protobuf.FieldDescriptorProto
160+
# Google.Protobuf.MethodDescriptorProto
161+
# Google.Protobuf.OneofDescriptorProto
162+
def types_from_descriptor(_) do
157163
[]
158164
end
159165

0 commit comments

Comments
 (0)