From 5ccb34744e2ab341bfc898d607a0c7fb5654c1bf Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Thu, 8 Feb 2018 16:51:26 -0800 Subject: [PATCH] plugin/gRPC: fix panic when special paths are not set (#3946) * plugin/gRPC: fix panic when special paths are not set * Remove comment --- logical/plugin/grpc_backend_client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/logical/plugin/grpc_backend_client.go b/logical/plugin/grpc_backend_client.go index 8e584d778d3f..7df90837d1c3 100644 --- a/logical/plugin/grpc_backend_client.go +++ b/logical/plugin/grpc_backend_client.go @@ -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,