summaryrefslogtreecommitdiff
path: root/src/c/http.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-25 13:11:43 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-25 13:11:43 -0500
commitaea9e6db8a7a72dd555913a38cb893d247c3c09e (patch)
tree36a6ce08dd187e10bfb353692a0b2cef5c4c64cc /src/c/http.c
parent2555c24cbd50d7afc517f7c9e6cac77ba87f0d99 (diff)
Tweaking handling of database transactions
Diffstat (limited to 'src/c/http.c')
-rw-r--r--src/c/http.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/c/http.c b/src/c/http.c
index 9050aaf4..17833ce1 100644
--- a/src/c/http.c
+++ b/src/c/http.c
@@ -447,10 +447,11 @@ void uw_copy_client_data(void *dst, void *src) {
}
void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
- do {
- uw_ensure_transaction(ctx);
- uw_get_app(ctx)->expunger(ctx, cli);
- } while (uw_commit(ctx) && (uw_rollback(ctx, 1), 1));
+ uw_ensure_transaction(ctx);
+ uw_get_app(ctx)->expunger(ctx, cli);
+
+ if (uw_commit(ctx))
+ uw_error(ctx, UNLIMITED_RETRY, "Rerunning expunge transaction");
}
void uw_post_expunge(uw_context ctx, void *data) {