Skip to content

Commit

Permalink
pass ctx properly in internal client.ExecuteStatement
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Palau Zarza <miguel.palau@grafana.com>
  • Loading branch information
shelldandy committed Aug 5, 2024
1 parent 93222ab commit 7319619
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ func (tsc *ThriftServiceClient) ExecuteStatement(ctx context.Context, req *cli_s
log, ctx = LoggerAndContext(ctx, req)
msg, start := log.Track("ExecuteStatement")

// We use context.Background to fix a problem where on context done the query would not be cancelled.
resp, err := tsc.TCLIServiceClient.ExecuteStatement(context.Background(), req)
resp, err := tsc.TCLIServiceClient.ExecuteStatement(ctx, req)
log, ctx = LoggerAndContext(ctx, resp)
logDisplayMessage(resp, log)
logExecStatementState(resp, log)
Expand Down

0 comments on commit 7319619

Please sign in to comment.