comparison src/c/urweb.c @ 2272:b49d22a4eda8

Merge.
author Ziv Scully <ziv@mit.edu>
date Sat, 31 Oct 2015 23:35:42 -0400
parents 1e3ba868f8bf d87d72b6e299
children 32a407902d3b
comparison
equal deleted inserted replaced
2271:85f91c7452b0 2272:b49d22a4eda8
816 if (ctx->db) { 816 if (ctx->db) {
817 ctx->app->db_close(ctx); 817 ctx->app->db_close(ctx);
818 ctx->db = NULL; 818 ctx->db = NULL;
819 } 819 }
820 ctx->app->db_init(ctx); 820 ctx->app->db_init(ctx);
821
822 if (!ctx->db)
823 uw_error(ctx, FATAL, "Error reopening database connection");
824 } 821 }
825 822
826 void uw_try_reconnecting_and_restarting(uw_context ctx) { 823 void uw_try_reconnecting_and_restarting(uw_context ctx) {
827 uw_try_reconnecting(ctx); 824 uw_try_reconnecting(ctx);
828 uw_error(ctx, BOUNDED_RETRY, "Restarting transaction after fixing database connection"); 825 uw_error(ctx, BOUNDED_RETRY, "Restarting transaction after fixing database connection");