Skip to content

Commit

Permalink
Disable access file when using Unix socket
Browse files Browse the repository at this point in the history
  • Loading branch information
SimulPiscator authored Oct 11, 2023
1 parent efe9004 commit d234c00
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,14 @@ Server::run()

bool ok = false, done = false;
do {
AccessFile accessfile(mAccessfile);
if (!accessfile.errors().empty()) {
std::clog << "errors in accessfile:\n" << accessfile.errors() << " terminating" << std::endl;
return false;
if (UnixSocket().empty()) {
AccessFile accessfile(mAccessfile);
if (!accessfile.errors().empty()) {
std::clog << "errors in accessfile:\n" << accessfile.errors() << " terminating" << std::endl;
return false;
}
HttpServer::applyAccessFile(accessfile);
}
HttpServer::applyAccessFile(accessfile);

struct timespec t = { 0 };
::clock_gettime(CLOCK_MONOTONIC, &t);
Expand Down

0 comments on commit d234c00

Please sign in to comment.