mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[7270] Apply mangos code style.
This commit is contained in:
parent
7c67848b48
commit
671a942d14
2 changed files with 67 additions and 65 deletions
|
|
@ -125,8 +125,7 @@ public:
|
||||||
loopCounter = 0;
|
loopCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void checkping ()
|
||||||
checkping ()
|
|
||||||
{
|
{
|
||||||
// ping if need
|
// ping if need
|
||||||
if ((++loopCounter) == numLoops)
|
if ((++loopCounter) == numLoops)
|
||||||
|
|
@ -139,8 +138,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void run ()
|
||||||
run (void)
|
|
||||||
{
|
{
|
||||||
SocketHandler h;
|
SocketHandler h;
|
||||||
|
|
||||||
|
|
@ -170,18 +168,22 @@ public:
|
||||||
|
|
||||||
// if use ra spend time waiting for io, if not use ra ,just sleep
|
// if use ra spend time waiting for io, if not use ra ,just sleep
|
||||||
if (usera)
|
if (usera)
|
||||||
|
{
|
||||||
while (!World::IsStopped())
|
while (!World::IsStopped())
|
||||||
{
|
{
|
||||||
h.Select (0, socketSelecttime);
|
h.Select (0, socketSelecttime);
|
||||||
checkping ();
|
checkping ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
while (!World::IsStopped())
|
while (!World::IsStopped())
|
||||||
{
|
{
|
||||||
ZThread::Thread::sleep (static_cast<unsigned long> (socketSelecttime / 1000));
|
ZThread::Thread::sleep (static_cast<unsigned long> (socketSelecttime / 1000));
|
||||||
checkping ();
|
checkping ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Master::Master()
|
Master::Master()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7269"
|
#define REVISION_NR "7270"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue