comparison src/c/urweb.c @ 2186:d87d72b6e299

Remove spurious failure about reopening database connection
author Adam Chlipala <adam@chlipala.net>
date Sat, 31 Oct 2015 19:21:05 -0400
parents c76a9712334c
children 14c45a0b6362 b49d22a4eda8
comparison
equal deleted inserted replaced
2185:cbd294994c69 2186:d87d72b6e299
804 if (ctx->db) { 804 if (ctx->db) {
805 ctx->app->db_close(ctx); 805 ctx->app->db_close(ctx);
806 ctx->db = NULL; 806 ctx->db = NULL;
807 } 807 }
808 ctx->app->db_init(ctx); 808 ctx->app->db_init(ctx);
809
810 if (!ctx->db)
811 uw_error(ctx, FATAL, "Error reopening database connection");
812 } 809 }
813 810
814 void uw_try_reconnecting_and_restarting(uw_context ctx) { 811 void uw_try_reconnecting_and_restarting(uw_context ctx) {
815 uw_try_reconnecting(ctx); 812 uw_try_reconnecting(ctx);
816 uw_error(ctx, BOUNDED_RETRY, "Restarting transaction after fixing database connection"); 813 uw_error(ctx, BOUNDED_RETRY, "Restarting transaction after fixing database connection");