From 402ee024e58ce7824792bc420d7eaca370264593 Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Sat, 7 Dec 2024 02:05:20 +0900 Subject: [PATCH] Make sure sending cancel request in StatementClient.close() --- lib/trino/client/statement_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/trino/client/statement_client.rb b/lib/trino/client/statement_client.rb index 1f2c94e6..11d55e3d 100644 --- a/lib/trino/client/statement_client.rb +++ b/lib/trino/client/statement_client.rb @@ -262,7 +262,7 @@ def cancel_leaf_stage end def close - return unless running? + return if finished? || query_failed? @state = :client_aborted