mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Random tid for docker. 3.0.65
This commit is contained in:
parent
4cd03a7c06
commit
488f16f60c
3 changed files with 7 additions and 2 deletions
|
@ -43,7 +43,11 @@ SrsThreadContext::~SrsThreadContext()
|
|||
|
||||
int SrsThreadContext::generate_id()
|
||||
{
|
||||
static int id = 100;
|
||||
static int id = 0;
|
||||
|
||||
if (id == 0) {
|
||||
id = (100 + ((int)(int64_t)this)%1000);
|
||||
}
|
||||
|
||||
int gid = id++;
|
||||
cache[srs_thread_self()] = gid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue