aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/worldserver/Master.cpp30
-rw-r--r--src/server/worldserver/Master.h1
2 files changed, 4 insertions, 27 deletions
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index fb2d828e284..f6f4260e303 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -54,11 +54,6 @@
extern int m_ServiceStatus;
#endif
-/// \todo Warning disabling not useful under VC++2005. Can somebody say on which compiler it is useful?
-#pragma warning(disable:4305)
-
-volatile uint32 Master::m_masterLoopCounter = 0;
-
/// Handle cored's termination signals
class CoredSignalHandler : public Trinity::SignalHandler
{
@@ -91,42 +86,25 @@ public:
void SetDelayTime(uint32 t) { _delaytime = t; }
void run(void)
{
- if(!_delaytime)
+ if (!_delaytime)
return;
sLog.outString("Starting up anti-freeze thread (%u seconds max stuck time)...",_delaytime/1000);
m_loops = 0;
w_loops = 0;
m_lastchange = 0;
w_lastchange = 0;
- while(!World::IsStopped())
+ while (!World::IsStopped())
{
ACE_Based::Thread::Sleep(1000);
uint32 curtime = getMSTime();
- //DEBUG_LOG("anti-freeze: time=%u, counters=[%u; %u]",curtime,Master::m_masterLoopCounter,World::m_worldLoopCounter);
-
- // There is no Master anymore
- // TODO: clear the rest of the code
-// // normal work
-// if(m_loops != Master::m_masterLoopCounter)
-// {
-// m_lastchange = curtime;
-// m_loops = Master::m_masterLoopCounter;
-// }
-// // possible freeze
-// else if(getMSTimeDiff(m_lastchange,curtime) > _delaytime)
-// {
-// sLog.outError("Main/Sockets Thread hangs, kicking out server!");
-// *((uint32 volatile*)NULL) = 0; // bang crash
-// }
-
// normal work
- if(w_loops != World::m_worldLoopCounter)
+ if (w_loops != World::m_worldLoopCounter)
{
w_lastchange = curtime;
w_loops = World::m_worldLoopCounter;
}
// possible freeze
- else if(getMSTimeDiff(w_lastchange,curtime) > _delaytime)
+ else if (getMSTimeDiff(w_lastchange,curtime) > _delaytime)
{
sLog.outError("World Thread hangs, kicking out server!");
*((uint32 volatile*)NULL) = 0; // bang crash
diff --git a/src/server/worldserver/Master.h b/src/server/worldserver/Master.h
index 00628827e2a..e8105705435 100644
--- a/src/server/worldserver/Master.h
+++ b/src/server/worldserver/Master.h
@@ -34,7 +34,6 @@ class Master
Master();
~Master();
int Run();
- static volatile uint32 m_masterLoopCounter;
private:
bool _StartDB();