mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
Refine stat id
This commit is contained in:
parent
fb7c051833
commit
4f013404e3
1 changed files with 5 additions and 3 deletions
|
@ -40,9 +40,12 @@ string srs_generate_id()
|
|||
static int64_t srs_gvid = 0;
|
||||
|
||||
if (srs_gvid == 0) {
|
||||
srs_gvid = getpid() * 3;
|
||||
srs_gvid = getpid();
|
||||
}
|
||||
return "vid-" + srs_int2str(srs_gvid++);
|
||||
|
||||
string prefix = "vid";
|
||||
string rand_id = srs_int2str(srs_get_system_time() % 1000);
|
||||
return prefix + "-" + srs_int2str(srs_gvid++) + "-" + rand_id;
|
||||
}
|
||||
|
||||
SrsStatisticVhost::SrsStatisticVhost()
|
||||
|
@ -203,7 +206,6 @@ void SrsStatisticStream::close()
|
|||
|
||||
SrsStatisticClient::SrsStatisticClient()
|
||||
{
|
||||
id = srs_generate_id();
|
||||
stream = NULL;
|
||||
conn = NULL;
|
||||
req = NULL;
|
||||
|
|
Loading…
Reference in a new issue