Commit ef3ee436 authored by Soultz's avatar Soultz Committed by helei

ignore ELIMIT for circuit breaker

parent 1d29f21b
......@@ -17,6 +17,8 @@
#include "brpc/circuit_breaker.h"
#include "brpc/circuit_breaker.h"
#include <cmath>
#include <mutex>
#include <gflags/gflags.h>
......@@ -68,7 +70,7 @@ namespace {
std::once_flag g_init_ignored_error_codes_once;
std::set<int> g_ignored_error_codes;
void InitIgoredErrorCodes() {
void InitIgnoredErrorCodes() {
std::vector<std::string> error_codes;
SplitString(FLAGS_circuit_breaker_ignored_error_codes, ',', &error_codes);
for (const std::string& str : error_codes) {
......@@ -198,7 +200,7 @@ CircuitBreaker::CircuitBreaker()
}
bool CircuitBreaker::OnCallEnd(int error_code, int64_t latency) {
std::call_once(g_init_ignored_error_codes_once, InitIgoredErrorCodes);
std::call_once(g_init_ignored_error_codes_once, InitIgnoredErrorCodes);
if (g_ignored_error_codes.find(error_code) != g_ignored_error_codes.end()) {
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment