From ff430ef043bf057a6dbca60f56984234dce044f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Date: Thu, 9 Jun 2022 14:52:39 +0300 Subject: [PATCH] query: call Close() in gRPC API too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Giedrius Statkevičius --- pkg/api/query/grpc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/api/query/grpc.go b/pkg/api/query/grpc.go index db27b24edf..a5fe1f84d1 100644 --- a/pkg/api/query/grpc.go +++ b/pkg/api/query/grpc.go @@ -83,6 +83,7 @@ func (g *GRPCAPI) Query(request *querypb.QueryRequest, server querypb.Query_Quer if err != nil { return err } + defer qry.Close() result := qry.Exec(ctx) if err := server.Send(querypb.NewQueryWarningsResponse(result.Warnings)); err != nil { @@ -155,6 +156,7 @@ func (g *GRPCAPI) QueryRange(request *querypb.QueryRangeRequest, srv querypb.Que if err != nil { return err } + defer qry.Close() result := qry.Exec(ctx) if err := srv.Send(querypb.NewQueryRangeWarningsResponse(result.Warnings)); err != nil {