Skip to content

Commit bfa6b60

Browse files
committed
fix(statement): keep deadline cleanup asynchronous
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
1 parent 1668d98 commit bfa6b60

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎src/client/sea.rs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,13 @@ impl SeaRestTransport {
828828
statement_id,
829829
error,
830830
}) => {
831+
// The deadline can become ready in the same scheduler tick as
832+
// the poll sleep. If the inner check wins, preserve the normal
833+
// timeout contract: the statement layer dispatches bounded
834+
// cancel/close cleanup without delaying this return.
835+
if crate::statement::timeout::is_client_query_timeout(&error) {
836+
return Err(error);
837+
}
831838
if let Some(statement_id) = statement_id {
832839
self.close_orphaned_statement(&statement_id, "wait_for_terminal")
833840
.await;

0 commit comments

Comments
 (0)