Commit 9792b5f1 authored by jan.koester's avatar jan.koester
Browse files

test

parent 3b9296d2
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -131,10 +131,10 @@ blogi::Blogi::Blogi(std::vector<netplus::socket*> serversocket,bool debug) : Htt
                    ctx.plgArgs->database.emplace_back(std::move(db));
                }
                break;
            } catch(std::runtime_error &e) {
            } catch(std::exception &e) {
                std::cerr << "can't connect db for domain '" << dcfg.names[0] << "' (attempt " << attempt << "/" << maxRetries << "): " << e.what() << std::endl;
                if (attempt == maxRetries) {
                    throw e;
                    throw;
                }
                std::cerr << "  retrying in " << retrySec << "s..." << std::endl;
                sleep(retrySec);
@@ -2701,6 +2701,11 @@ public:
            }
        }catch(netplus::NetException &e){
            std::cerr << e.what() << std::endl;
        }catch(std::exception &e){
            // Catch-all (e.g. std::runtime_error from a failed DB connection in
            // the Blogi constructor) so the service exits cleanly instead of
            // aborting via std::terminate on an uncaught exception.
            std::cerr << "Fatal: " << e.what() << std::endl;
        }
    };
};