File tree 2 files changed +3
-6
lines changed
2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 22
22
defaultPhishingDb = "https://cfg.rpchub.io/agg/scam-addresses.json"
23
23
24
24
_Config = & Config {
25
- RequestTimeout : 90 ,
25
+ RequestTimeout : 120 ,
26
26
MaxRetries : 3 ,
27
27
PhishingDb : []string {defaultPhishingDb },
28
28
PhishingDbUpdateInterval : 3600 ,
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
11
11
"github.com/failsafe-go/failsafe-go"
12
12
"github.com/failsafe-go/failsafe-go/circuitbreaker"
13
- "github.com/failsafe-go/failsafe-go/timeout"
14
13
cmap "github.com/orcaman/concurrent-map/v2"
15
14
"github.com/valyala/fasthttp"
16
15
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
@@ -111,13 +110,11 @@ func (m *HttpProxyMiddleware) OnProcess(session *rpc.Session) error {
111
110
policies = make ([]failsafe.Policy [any ], 0 )
112
111
// circuit breaker opens after 3 failures, half-opens after 1 minute, closes after 2 successes
113
112
circuitBreaker := circuitbreaker .Builder [any ]().
114
- WithFailureThreshold (3 ).
113
+ WithFailureThreshold (5 ).
115
114
WithDelay (time .Minute ).
116
115
WithSuccessThreshold (2 ).
117
116
Build ()
118
- // timeout after 90 seconds
119
- timeoutPolicy := timeout.With [any ](90 * time .Second )
120
- policies = append (policies , timeoutPolicy , circuitBreaker )
117
+ policies = append (policies , circuitBreaker )
121
118
m .policiesMap .Set (session .NodeName , policies )
122
119
}
123
120
You can’t perform that action at this time.
0 commit comments