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
|
@ -817,7 +817,7 @@ srs_error_t SrsServer::initialize_st()
|
|||
}
|
||||
|
||||
// set current log id.
|
||||
_srs_context->generate_id();
|
||||
_srs_context->set_id(_srs_context->generate_id());
|
||||
|
||||
// check asprocess.
|
||||
bool asprocess = _srs_config->get_asprocess();
|
||||
|
|
|
@ -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