Skip to content

Commit

Permalink
fix: remove premature GRPC client connection close from vault (#17321)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-gopalan committed Sep 29, 2022
1 parent cd90c64 commit 7061d12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion sdk/plugin/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 1 addition & 5 deletions sdk/plugin/grpc_backend_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 7061d12

Please sign in to comment.