feat(Core/Threading): replace ace threading (#4821)
This commit is contained in:
parent
b9e84d8278
commit
b2861be1cd
50 changed files with 300 additions and 342 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue