Skip to content

Commit

Permalink
plugin/gRPC: fix panic when special paths are not set (#3946)
Browse files Browse the repository at this point in the history
* plugin/gRPC: fix panic when special paths are not set

* Remove comment
  • Loading branch information
briankassouf committed Feb 9, 2018
1 parent f64bcf1 commit 5ccb347
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion logical/plugin/grpc_backend_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,15 @@ func (b *backendGRPCPluginClient) HandleRequest(ctx context.Context, req *logica
}

func (b *backendGRPCPluginClient) SpecialPaths() *logical.Paths {
// Timeout the connection
reply, err := b.client.SpecialPaths(b.doneCtx, &pb.Empty{})
if err != nil {
return nil
}

if reply.Paths == nil {
return nil
}

return &logical.Paths{
Root: reply.Paths.Root,
Unauthenticated: reply.Paths.Unauthenticated,
Expand Down

0 comments on commit 5ccb347

Please sign in to comment.