diff src/c/fastcgi.c @ 1941:9f3597979e98

Tweaking handling of database transactions
author Adam Chlipala <adam@chlipala.net>
date Wed, 25 Dec 2013 13:11:43 -0500
parents d02c1a0d8082
children c93fbd139732
line wrap: on
line diff
--- a/src/c/fastcgi.c	Wed Dec 25 12:02:42 2013 -0500
+++ b/src/c/fastcgi.c	Wed Dec 25 13:11:43 2013 -0500
@@ -632,10 +632,11 @@
 }
 
 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) {