Skip to content

Commit 909d73f

Browse files
authored
pass ctx properly in internal client.ExecuteStatement (#244)
Fixes #242 Fixes #231 This needs to actually pass ctx so custom authenticators can make use of the context. Signed-off-by: Miguel Palau <[email protected]>
1 parent 0ddea37 commit 909d73f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/client/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ func (tsc *ThriftServiceClient) ExecuteStatement(ctx context.Context, req *cli_s
167167
log, ctx = LoggerAndContext(ctx, req)
168168
msg, start := log.Track("ExecuteStatement")
169169

170-
// We use context.Background to fix a problem where on context done the query would not be cancelled.
171-
resp, err := tsc.TCLIServiceClient.ExecuteStatement(context.Background(), req)
170+
resp, err := tsc.TCLIServiceClient.ExecuteStatement(ctx, req)
172171
log, ctx = LoggerAndContext(ctx, resp)
173172
logDisplayMessage(resp, log)
174173
logExecStatementState(resp, log)

0 commit comments

Comments
 (0)