summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/inspircd.cpp4
-rw-r--r--src/server.cpp2
3 files changed, 2 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 6444ee211..d8f733929 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -2372,4 +2372,5 @@ bool DoneELine(ServerConfig* conf, const char* tag)
void ConfigReaderThread::Run()
{
ServerInstance->Config->Read(do_bail, TheUserUID);
+ done = true;
}
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 7c82b706b..ab67449a2 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -762,8 +762,7 @@ int InspIRCd::Run()
#endif
/* Check if there is a config thread which has finished executing but has not yet been freed */
- RehashFinishMutex.Lock();
- if (this->ConfigThread && this->ConfigThread->GetExitFlag())
+ if (this->ConfigThread && this->ConfigThread->IsDone())
{
/* Rehash has completed */
@@ -798,7 +797,6 @@ int InspIRCd::Run()
delete ConfigThread;
ConfigThread = NULL;
}
- RehashFinishMutex.Unlock();
/* time() seems to be a pretty expensive syscall, so avoid calling it too much.
* Once per loop iteration is pleanty.
diff --git a/src/server.cpp b/src/server.cpp
index 46c17d14a..c7ebc187e 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -48,7 +48,6 @@ void InspIRCd::Exit(int status)
void RehashHandler::Call(const std::string &reason)
{
- Server->RehashFinishMutex.Lock();
Server->SNO->WriteToSnoMask('A', "Rehashing config file %s %s",ServerConfig::CleanFilename(Server->ConfigFileName), reason.c_str());
Server->RehashUsersAndChans();
FOREACH_MOD_I(Server, I_OnGarbageCollect, OnGarbageCollect());
@@ -60,7 +59,6 @@ void RehashHandler::Call(const std::string &reason)
Server->ConfigThread = new ConfigReaderThread(Server, false, "");
Server->Threads->Start(Server->ConfigThread);
}
- Server->RehashFinishMutex.Unlock();
}
void InspIRCd::RehashServer()