Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Nil Check for Package in File Descriptor #3223

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/netext/grpcext/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ func (rc *reflectionClient) resolveServiceFileDescriptors(
if err = proto.Unmarshal(raw, &fdp); err != nil {
return nil, fmt.Errorf("can't unmarshal proto on service %q: %w", service, err)
}

fdkey := fileDescriptorLookupKey{
Package: *fdp.Package,
Name: *fdp.Name,
Name: *fdp.Name,
}
if fdp.Package != nil {
fdkey.Package = *fdp.Package
}

if seen[fdkey] {
// When a proto file contains declarations for multiple services
// then the same proto file is returned multiple times,
Expand Down