plugin/gRPC: fix panic when special paths are not set (#3946)

* plugin/gRPC: fix panic when special paths are not set

* Remove comment
This commit is contained in:
Brian Kassouf 2018-02-08 16:51:26 -08:00 committed by GitHub
parent f64bcf1a9a
commit 5ccb34744e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,