summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp7
1 files changed, 4 insertions, 3 deletions
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