mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
feat(Core/Threading): replace ace threading (#4821)
This commit is contained in:
@@ -273,7 +273,7 @@ void AuthSocket::OnRead()
|
||||
|
||||
std::map<std::string, uint32> LastLoginAttemptTimeForIP;
|
||||
uint32 LastLoginAttemptCleanTime = 0;
|
||||
ACE_Thread_Mutex LastLoginAttemptMutex;
|
||||
std::mutex LastLoginAttemptMutex;
|
||||
|
||||
// Logon Challenge command handler
|
||||
bool AuthSocket::_HandleLogonChallenge()
|
||||
@@ -289,7 +289,7 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
|
||||
// pussywizard: logon flood protection:
|
||||
{
|
||||
ACORE_GUARD(ACE_Thread_Mutex, LastLoginAttemptMutex);
|
||||
std::lock_guard<std::mutex> guard(LastLoginAttemptMutex);
|
||||
std::string ipaddr = socket().getRemoteAddress();
|
||||
uint32 currTime = time(nullptr);
|
||||
std::map<std::string, uint32>::iterator itr = LastLoginAttemptTimeForIP.find(ipaddr);
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
bool _HandleXferAccept();
|
||||
|
||||
FILE* pPatch;
|
||||
ACE_Thread_Mutex patcherLock;
|
||||
std::mutex patcherLock;
|
||||
|
||||
private:
|
||||
RealmSocket& socket_;
|
||||
|
||||
Reference in New Issue
Block a user