mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Support circuit breaker. 4.0.103
This commit is contained in:
parent
46c980c70a
commit
92fc0af8f4
13 changed files with 434 additions and 9 deletions
|
@ -54,6 +54,7 @@ using namespace std;
|
|||
#include <srs_core_autofree.hpp>
|
||||
#include <srs_kernel_file.hpp>
|
||||
#include <srs_app_hybrid.hpp>
|
||||
#include <srs_app_threads.hpp>
|
||||
#ifdef SRS_RTC
|
||||
#include <srs_app_rtc_conn.hpp>
|
||||
#include <srs_app_rtc_server.hpp>
|
||||
|
@ -479,6 +480,11 @@ srs_error_t run_hybrid_server()
|
|||
return srs_error_wrap(err, "hybrid initialize");
|
||||
}
|
||||
|
||||
// Circuit breaker to protect server, which depends on hybrid.
|
||||
if ((err = _srs_circuit_breaker->initialize()) != srs_success) {
|
||||
return srs_error_wrap(err, "init circuit breaker");
|
||||
}
|
||||
|
||||
// Should run util hybrid servers all done.
|
||||
if ((err = _srs_hybrid->run()) != srs_success) {
|
||||
return srs_error_wrap(err, "hybrid run");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue