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:
parent
7052a1fafb
commit
bbc168d980
6 changed files with 13 additions and 14 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue