mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for bug #155, refine for osx, with ssl/http, disable statistics. 0.9.198.
This commit is contained in:
parent
554a9763db
commit
3111870316
5 changed files with 55 additions and 13 deletions
|
@ -671,6 +671,8 @@ int SrsServer::do_cycle()
|
|||
|
||||
// find the max loop
|
||||
int max = srs_max(0, SRS_SYS_TIME_RESOLUTION_MS_TIMES);
|
||||
|
||||
#ifndef SRS_AUTO_OSX
|
||||
max = srs_max(max, SRS_SYS_RUSAGE_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_CPU_STAT_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_DISK_STAT_RESOLUTION_TIMES);
|
||||
|
@ -678,6 +680,7 @@ int SrsServer::do_cycle()
|
|||
max = srs_max(max, SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES);
|
||||
#endif
|
||||
|
||||
// the deamon thread, update the time cache
|
||||
while (true) {
|
||||
|
@ -719,6 +722,8 @@ int SrsServer::do_cycle()
|
|||
srs_info("update current time cache.");
|
||||
srs_update_system_time_ms();
|
||||
}
|
||||
|
||||
#ifndef SRS_AUTO_OSX
|
||||
if ((i % SRS_SYS_RUSAGE_RESOLUTION_TIMES) == 0) {
|
||||
srs_info("update resource info, rss.");
|
||||
srs_update_system_rusage();
|
||||
|
@ -748,13 +753,14 @@ int SrsServer::do_cycle()
|
|||
resample_kbps(NULL);
|
||||
srs_update_rtmp_server((int)conns.size(), kbps);
|
||||
}
|
||||
#ifdef SRS_AUTO_HTTP_PARSER
|
||||
#ifdef SRS_AUTO_HTTP_PARSER
|
||||
if (_srs_config->get_heartbeat_enabled()) {
|
||||
if ((i % heartbeat_max_resolution) == 0) {
|
||||
srs_info("do http heartbeat, for internal server to report.");
|
||||
http_heartbeat->heartbeat();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
srs_info("server main thread loop");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue