Release v6.0-d5
The original code:
void SrsLiveSource::on_consumer_destroy(SrsLiveConsumer* consumer)
{
...
if (consumers.empty()) {
play_edge->on_all_client_stop();
// For edge server, the stream die when the last player quit, because the edge stream is created by player
// activities, so it should die when all players quit.
if (_srs_config->get_vhost_is_edge(req->vhost)) {
stream_die_at_ = srs_get_system_time();
}
// When no players, the publisher is idle now.
publisher_idle_at_ = srs_get_system_time();
}
}
Code that should be changed, Similar to SrsSrtSource::on_consumer_destroy():
void SrsLiveSource::on_consumer_destroy(SrsLiveConsumer* consumer)
{
...
if (consumers.empty()) {
play_edge->on_all_client_stop();
// For edge server, the stream die when the last player quit, because the edge stream is created by player
// activities, so it should die when all players quit.
if (_srs_config->get_vhost_is_edge(req->vhost)) {
stream_die_at_ = srs_get_system_time();
} else if (_can_publish) { // should die when no publishers and consumers.
stream_die_at_ = srs_get_system_time();
}
// When no players, the publisher is idle now.
publisher_idle_at_ = srs_get_system_time();
}
}
Release v6.0-d5
The original code:
Code that should be changed, Similar to SrsSrtSource::on_consumer_destroy():