diff --git a/sqlx-sqlite/src/connection/worker.rs b/sqlx-sqlite/src/connection/worker.rs index a01de241..c1c67636 100644 --- a/sqlx-sqlite/src/connection/worker.rs +++ b/sqlx-sqlite/src/connection/worker.rs @@ -151,7 +151,8 @@ impl ConnectionWorker { match limit { None => { for res in iter { - if tx.send(res).is_err() { + let has_error = res.is_err(); + if tx.send(res).is_err() || has_error { break; } } @@ -171,7 +172,8 @@ impl ConnectionWorker { } } } - if tx.send(res).is_err() { + let has_error = res.is_err(); + if tx.send(res).is_err() || has_error { break; } }