1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Refine generate_id, never set the cid for current thread

This commit is contained in:
winlin 2020-07-09 18:11:49 +08:00
parent 7052a1fafb
commit bbc168d980
6 changed files with 13 additions and 14 deletions

View file

@ -197,11 +197,10 @@ SrsContextId SrsSTCoroutine::cid()
srs_error_t SrsSTCoroutine::cycle()
{
if (_srs_context) {
if (!cid_.empty()) {
_srs_context->set_id(cid_);
} else {
if (cid_.empty()) {
cid_ = _srs_context->generate_id();
}
_srs_context->set_id(cid_);
}
srs_error_t err = handler->cycle();