Improved on/off display for streams.

This commit is contained in:
Thulinma 2015-09-29 11:03:26 +02:00
parent 24c17e9466
commit c9a30c2816

View file

@ -447,7 +447,7 @@ bool Controller::hasViewers(std::string streamName){
if (sessions.size()){ if (sessions.size()){
long long currTime = Util::epoch(); long long currTime = Util::epoch();
for (std::map<sessIndex, statSession>::iterator it = sessions.begin(); it != sessions.end(); it++){ for (std::map<sessIndex, statSession>::iterator it = sessions.begin(); it != sessions.end(); it++){
if (it->first.streamName == streamName && it->second.hasDataFor(currTime)){ if (it->first.streamName == streamName && (it->second.hasDataFor(currTime) || it->second.hasDataFor(currTime-1))){
return true; return true;
} }
} }