summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-20 21:46:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-20 21:46:56 +0000
commit636a52312b9ba4c5ffc886c7bdba14bd76726976 (patch)
treefc0bcfb807530d65ffd96404e921ce1a83d64ec5 /src/server.cpp
parent552885befec44649c16d09fb755813041341a1fc (diff)
Fix a rather nasty race condition revealed by my reading through the comments and enhancing them. Back when i did executeable includes, i placed a 'todo' in the code which said something along the lines of:
'we cant pass a User* into the config reader any more, because when the config reader thread finishes, that user may be gone and this will crash. Consider using an UID instead so that if the user vanishes, we can detect this situation.' Of course, nobody ever did this, so i'm doing it now to ensure we dont come up against some particularly ugly race condition crashes! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10569 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp
index d8ab76425..8879e1eb8 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -53,10 +53,10 @@ void RehashHandler::Call(const std::string &reason)
FOREACH_MOD_I(Server, I_OnGarbageCollect, OnGarbageCollect());
if (!Server->ConfigThread)
{
- Server->Config->RehashUser = NULL;
+ Server->Config->RehashUserUID = "";
Server->Config->RehashParameter = "";
- Server->ConfigThread = new ConfigReaderThread(Server, false, NULL);
+ Server->ConfigThread = new ConfigReaderThread(Server, false, "");
Server->Threads->Create(Server->ConfigThread);
}
}