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

STAT: Refine stat for global server.

This commit is contained in:
winlin 2022-08-27 18:50:13 +08:00
parent da24de5ecb
commit 4e3ea99ccd
6 changed files with 17 additions and 15 deletions

View file

@ -195,12 +195,12 @@ string srs_generate_tc_url(string host, string vhost, string app, int port)
string tcUrl = "rtmp://";
if (vhost == SRS_CONSTS_RTMP_DEFAULT_VHOST) {
tcUrl += host;
tcUrl += host.empty() ? SRS_CONSTS_RTMP_DEFAULT_VHOST : host;
} else {
tcUrl += vhost;
}
if (port != SRS_CONSTS_RTMP_DEFAULT_PORT) {
if (port && port != SRS_CONSTS_RTMP_DEFAULT_PORT) {
tcUrl += ":" + srs_int2str(port);
}