- try to improve network performance
This commit is contained in:
parent
c36e8297fa
commit
97aadb6a44
|
@ -79,9 +79,9 @@ void ClientInterfaceThread::execute() {
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
|
|
||||||
// Set socket to blocking
|
// Set socket to blocking
|
||||||
//if(clientInterface != NULL && clientInterface->getSocket(true) != NULL) {
|
if(clientInterface != NULL && clientInterface->getSocket(true) != NULL) {
|
||||||
// clientInterface->getSocket(true)->setBlock(true);
|
clientInterface->getSocket(true)->setBlock(true);
|
||||||
//}
|
}
|
||||||
|
|
||||||
for(;this->clientInterface != NULL;) {
|
for(;this->clientInterface != NULL;) {
|
||||||
if(getQuitStatus() == true) {
|
if(getQuitStatus() == true) {
|
||||||
|
@ -1782,8 +1782,8 @@ NetworkMessageType ClientInterface::waitForMessage(int waitMicroseconds)
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
// Sleep every x milli-seconds we wait to let other threads work
|
// Sleep every x milli-seconds we wait to let other threads work
|
||||||
else if(chrono.getMillis() % 100 == 0) {
|
else if(chrono.getMillis() % 5 == 0) {
|
||||||
sleep(10);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//sleep(waitSleepTime);
|
//sleep(waitSleepTime);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user