Fixed various live issues.
This commit is contained in:
parent
a3ae7c365f
commit
a001feafca
2 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue