Mercurial > urweb
changeset 1437:493e087f5479
Exit periodic loop if a ROLLBACK fails, to avoid infinite looping when the database server is brought down
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 18 Mar 2011 09:12:55 -0400 (2011-03-18) |
parents | 3d5e4c5fb6ee |
children | b6df00ed536c |
files | src/c/request.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)