fix: remove premature GRPC client connection close from vault (#17321)

This commit is contained in:
vinay-gopalan
2022-09-29 14:11:34 -07:00
committed by GitHub
parent cd90c64e5c
commit 7061d12e6f
2 changed files with 1 additions and 6 deletions

View File

@@ -59,7 +59,6 @@ func (b *GRPCBackendPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCB
ret := &backendGRPCPluginClient{
client: pb.NewBackendClient(c),
versionClient: logical.NewPluginVersionClient(c),
clientConn: c,
broker: broker,
cleanupCh: make(chan struct{}),
doneCtx: ctx,

View File

@@ -42,10 +42,7 @@ type backendGRPCPluginClient struct {
// server is the grpc server used for serving storage and sysview requests.
server *atomic.Value
// clientConn is the underlying grpc connection to the server, we store it
// so it can be cleaned up.
clientConn *grpc.ClientConn
doneCtx context.Context
doneCtx context.Context
}
func (b *backendGRPCPluginClient) Initialize(ctx context.Context, _ *logical.InitializationRequest) error {
@@ -194,7 +191,6 @@ func (b *backendGRPCPluginClient) Cleanup(ctx context.Context) {
if server != nil {
server.(*grpc.Server).GracefulStop()
}
b.clientConn.Close()
}
func (b *backendGRPCPluginClient) InvalidateKey(ctx context.Context, key string) {