diff --git a/src/input/input_dtsc.cpp b/src/input/input_dtsc.cpp index e13b0595..180f0e36 100644 --- a/src/input/input_dtsc.cpp +++ b/src/input/input_dtsc.cpp @@ -100,6 +100,8 @@ namespace Mist { std::string toRec = srcConn.Received().copy(8); unsigned long rSize = Bit::btohl(toRec.c_str() + 4); if (!srcConn.Received().available(8 + rSize)) { + nProxy.userClient.keepAlive(); + Util::sleep(100); continue; //abort - not enough data yet } //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()); break; } + }else{ + Util::sleep(100); + nProxy.userClient.keepAlive(); } } } @@ -215,6 +220,7 @@ namespace Mist { if (!needsLock()){ thisPacket.reInit(srcConn); if (thisPacket.getVersion() == DTSC::DTCM){ + nProxy.userClient.keepAlive(); std::string cmd; thisPacket.getString("cmd", cmd); if (cmd == "reset"){ diff --git a/src/output/output.h b/src/output/output.h index 82699d09..f391c9fd 100644 --- a/src/output/output.h +++ b/src/output/output.h @@ -54,7 +54,7 @@ namespace Mist { /*LTS-END*/ //non-virtual generic functions int run(); - void stats(bool force = false); + virtual void stats(bool force = false); void seek(unsigned long long pos); bool seek(unsigned int tid, unsigned long long pos, bool getNextKey = false); void stop();