mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Use unique_ptr for InspIRCd::ConfigThread.
This commit is contained in:
parent
2ab1281c4d
commit
566d438348
@ -225,7 +225,7 @@ public:
|
||||
std::unique_ptr<ServerConfig> Config;
|
||||
|
||||
/* If non-nullptr then the thread that is reading the server configuration on rehash. */
|
||||
ConfigReaderThread* ConfigThread = nullptr;
|
||||
std::unique_ptr<ConfigReaderThread> ConfigThread;
|
||||
|
||||
/** A fake user that represents the local server. */
|
||||
FakeUser* FakeClient = nullptr;
|
||||
|
@ -629,7 +629,7 @@ void InspIRCd::Run()
|
||||
/* Rehash has completed */
|
||||
this->Logs.Normal("CONFIG", "New configuration has been read, applying...");
|
||||
ConfigThread->Stop();
|
||||
stdalgo::delete_zero(ConfigThread);
|
||||
ConfigThread.reset(nullptr);
|
||||
}
|
||||
|
||||
UpdateTime();
|
||||
|
@ -62,7 +62,7 @@ void InspIRCd::Rehash(const std::string& uuid)
|
||||
{
|
||||
if (!ConfigThread)
|
||||
{
|
||||
ConfigThread = new ConfigReaderThread(uuid);
|
||||
ConfigThread = std::make_unique<ConfigReaderThread>(uuid);
|
||||
ConfigThread->Start();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user