Skip to content

Commit

Permalink
fix(Sqlite): stop sending rows after first error (#3700)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydewaal authored Jan 24, 2025
1 parent ad1d7a8 commit f4c7498
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sqlx-sqlite/src/connection/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
}
}
Expand Down

0 comments on commit f4c7498

Please sign in to comment.