# HG changeset patch # User Adam Chlipala # Date 1300453975 14400 # Node ID 493e087f5479a4de492840a234de99cf0450ccdb # Parent 3d5e4c5fb6ee8be9f33200ea1d16316076f6b51c Exit periodic loop if a ROLLBACK fails, to avoid infinite looping when the database server is brought down diff -r 3d5e4c5fb6ee -r 493e087f5479 src/c/request.c --- a/src/c/request.c Sat Mar 12 14:30:08 2011 -0500 +++ b/src/c/request.c Fri Mar 18 09:12:55 2011 -0400 @@ -111,7 +111,8 @@ else if (r == FATAL) p->ls->log_error(p->ls->logger_data, "Fatal error: %s\n", uw_error_message(ctx)); if (r == FATAL || r == BOUNDED_RETRY || r == UNLIMITED_RETRY) - try_rollback(ctx, 0, p->ls->logger_data, p->ls->log_error); + if (try_rollback(ctx, 0, p->ls->logger_data, p->ls->log_error)) + return NULL; } while (r == UNLIMITED_RETRY || (r == BOUNDED_RETRY && retries_left > 0)); if (r != FATAL && r != BOUNDED_RETRY)