1
0

fix: lower limit also on connection refused

This commit is contained in:
dump_stack() 2023-05-17 05:39:24 +00:00
parent ac2166b050
commit 15a6f38631
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -104,7 +104,8 @@ func getJson(query string, target interface{}) (err error) {
flog.Trace().Msg("start") flog.Trace().Msg("start")
resp, err = http.Get(query) resp, err = http.Get(query)
if err != nil { if err != nil {
if strings.Contains(err.Error(), "reset by peer") { if strings.Contains(err.Error(), "reset by peer") ||
strings.Contains(err.Error(), "connection refused") {
flog.Debug().Err(err).Msg("") flog.Debug().Err(err).Msg("")
lowerLimit() lowerLimit()
continue continue