Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2016-09-02 17:51:01 +02:00
commit 63c0dbb18d
2 changed files with 7 additions and 1 deletions

View file

@ -100,6 +100,8 @@ namespace Mist {
std::string toRec = srcConn.Received().copy(8); std::string toRec = srcConn.Received().copy(8);
unsigned long rSize = Bit::btohl(toRec.c_str() + 4); unsigned long rSize = Bit::btohl(toRec.c_str() + 4);
if (!srcConn.Received().available(8 + rSize)) { if (!srcConn.Received().available(8 + rSize)) {
nProxy.userClient.keepAlive();
Util::sleep(100);
continue; //abort - not enough data yet continue; //abort - not enough data yet
} }
//Ignore initial DTCM message, as this is a "hi" message from the server //Ignore initial DTCM message, as this is a "hi" message from the server
@ -118,6 +120,9 @@ namespace Mist {
INFO_MSG("Received a wrong type of packet - '%s'", srcConn.Received().copy(4).c_str()); INFO_MSG("Received a wrong type of packet - '%s'", srcConn.Received().copy(4).c_str());
break; break;
} }
}else{
Util::sleep(100);
nProxy.userClient.keepAlive();
} }
} }
} }
@ -215,6 +220,7 @@ namespace Mist {
if (!needsLock()){ if (!needsLock()){
thisPacket.reInit(srcConn); thisPacket.reInit(srcConn);
if (thisPacket.getVersion() == DTSC::DTCM){ if (thisPacket.getVersion() == DTSC::DTCM){
nProxy.userClient.keepAlive();
std::string cmd; std::string cmd;
thisPacket.getString("cmd", cmd); thisPacket.getString("cmd", cmd);
if (cmd == "reset"){ if (cmd == "reset"){

View file

@ -54,7 +54,7 @@ namespace Mist {
/*LTS-END*/ /*LTS-END*/
//non-virtual generic functions //non-virtual generic functions
int run(); int run();
void stats(bool force = false); virtual void stats(bool force = false);
void seek(unsigned long long pos); void seek(unsigned long long pos);
bool seek(unsigned int tid, unsigned long long pos, bool getNextKey = false); bool seek(unsigned int tid, unsigned long long pos, bool getNextKey = false);
void stop(); void stop();