Fixed various live issues.

This commit is contained in:
Thulinma 2014-12-30 02:08:14 +01:00
parent a3ae7c365f
commit a001feafca
2 changed files with 11 additions and 4 deletions

View file

@ -421,8 +421,9 @@ void Controller::parseStatistics(char * data, size_t len, unsigned int id){
/// Returns true if this stream has at least one connected client.
bool Controller::hasViewers(std::string streamName){
if (sessions.size()){
long long currTime = Util::epoch();
for (std::map<sessIndex, statSession>::iterator it = sessions.begin(); it != sessions.end(); it++){
if (it->first.streamName == streamName){
if (it->first.streamName == streamName && it->second.hasDataFor(currTime)){
return true;
}
}