mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SquashSRS4: Support circuit breaker
This commit is contained in:
parent
fd6c653d3c
commit
276bd2223e
16 changed files with 458 additions and 12 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