summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2015-10-17 11:08:12 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2015-10-17 11:08:12 -0400
commita05e87cadacd4f81c3150fdf92b8acf7141d150e (patch)
treed13cc9dbdc42b42664249cf31d3ec095820e9ea8 /src/c
parent2d198c091036767fdad1c3cd79f1bba4664682ea (diff)
Switching to a more dynamic method of handling database reconnection, restarting transactions
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 4ce469bd..9371147b 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -811,12 +811,9 @@ static void uw_try_reconnecting(uw_context ctx) {
uw_error(ctx, FATAL, "Error reopening database connection");
}
-int uw_try_reconnecting_if_at_most_one(uw_context ctx) {
- if (ctx->at_most_one_query) {
- uw_try_reconnecting(ctx);
- return 1;
- } else
- return 0;
+void uw_try_reconnecting_and_restarting(uw_context ctx) {
+ uw_try_reconnecting(ctx);
+ uw_error(ctx, UNLIMITED_RETRY, "Restarting transaction after fixing database connection");
}
void uw_ensure_transaction(uw_context ctx) {