feat(Core/Soap): delete ACE inherited (#4951)

This commit is contained in:
Kargatum
2021-05-30 18:06:02 +07:00
committed by GitHub
parent cedd636338
commit 48ddfd62c5
3 changed files with 38 additions and 71 deletions

View File

@@ -247,13 +247,16 @@ int Master::Run()
#endif
#endif
// Start soap serving thread
acore::Thread* soapThread = nullptr;
// Start soap serving thread if enabled
std::shared_ptr<std::thread> soapThread;
if (sConfigMgr->GetOption<bool>("SOAP.Enabled", false))
{
ACSoapRunnable* runnable = new ACSoapRunnable();
runnable->SetListenArguments(sConfigMgr->GetOption<std::string>("SOAP.IP", "127.0.0.1"), uint16(sConfigMgr->GetOption<int32>("SOAP.Port", 7878)));
soapThread = new acore::Thread(runnable);
soapThread.reset(new std::thread(ACSoapThread, sConfigMgr->GetOption<std::string>("SOAP.IP", "127.0.0.1"), sConfigMgr->GetOption<uint16>("SOAP.Port", 7878)),
[](std::thread* thr)
{
thr->join();
delete thr;
});
}
// Start up freeze catcher thread
@@ -286,13 +289,6 @@ int Master::Run()
rarThread.wait();
auctionLising_thread.wait();
if (soapThread)
{
soapThread->wait();
soapThread->destroy();
delete soapThread;
}
if (freezeThread)
{
freezeThread->wait();