diff options
author | 2013-12-23 15:59:17 +0000 | |
---|---|---|
committer | 2013-12-23 15:59:17 +0000 | |
commit | fac05ae0a6d7d080436c953d2085e137d75c5796 (patch) | |
tree | 710b0b096b788b1fb51c6222c97cc30632f0f964 /src/c/http.c | |
parent | 2f6649aa0b392fefe08e3eb604a93220a0c64324 (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) { |