Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/cmd/main.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#include <exception>
#include "config/config.hpp"
#include "core/server.hpp"
#include "utils/logger.hpp"

using namespace config;

int main(const int argc, char *argv[]) {
int startServer(const int argc, char *argv[]) {
if (argc != 2) {
LOG_ERROR("Usage: webserv <config file>");
return 1;
Expand All @@ -20,3 +21,11 @@ int main(const int argc, char *argv[]) {
s.start();
return 0;
}

int main(const int argc, char *argv[]) {
while (true) {
try {
return startServer(argc, argv);
} catch (std::exception &e) {}
}
}
Loading