X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=6ef5105aa5003d4c93ad216011035504f604f50d;hb=061a762095e983d07382f61cd69611a082792668;hp=f02c5bdbba67096c3e67ceacf6988746c6980c2e;hpb=e8f97ac8427c685a216c1df49f6a0b2f3750521d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index f02c5bdbb..6ef5105aa 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -657,12 +657,13 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) errstr << ce.GetReason(); } - // write once here, to try it out and make sure its ok - ServerInstance->WritePID(this->PID); - // Check errors before dealing with failed binds, since continuing on failed bind is wanted in some circumstances. valid = errstr.str().empty(); + // write once here, to try it out and make sure its ok + if (valid) + ServerInstance->WritePID(this->PID); + if (old) { // On first run, ports are bound later on