diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-12-23 15:59:17 +0000 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-12-23 15:59:17 +0000 |
commit | 76b26fec5a3b521a084491d77d6c9e1e28ab603c (patch) | |
tree | 710b0b096b788b1fb51c6222c97cc30632f0f964 /src/c/http.c | |
parent | b04455ed08e613b7a5b0491894ba688508546c13 (diff) |
Proper handling of serialization failures during SQL COMMIT
Diffstat (limited to 'src/c/http.c')
-rw-r--r-- | src/c/http.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/c/http.c b/src/c/http.c index c57740e9..9050aaf4 100644 --- a/src/c/http.c +++ b/src/c/http.c @@ -447,9 +447,10 @@ void uw_copy_client_data(void *dst, void *src) { } void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) { - uw_ensure_transaction(ctx); - uw_get_app(ctx)->expunger(ctx, cli); - uw_commit(ctx); + do { + uw_ensure_transaction(ctx); + uw_get_app(ctx)->expunger(ctx, cli); + } while (uw_commit(ctx) && (uw_rollback(ctx, 1), 1)); } void uw_post_expunge(uw_context ctx, void *data) { |