mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
GODT-1348: max 100 conn per host
This commit is contained in:
@ -82,6 +82,14 @@ func updateTime(_ *resty.Client, res *resty.Response) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func logConnReuse(_ *resty.Client, res *resty.Response) error {
|
||||
if !res.Request.TraceInfo().IsConnReused {
|
||||
logrus.WithField("host", res.Request.URL).Trace("Connection was NOT reused")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func catchRetryAfter(_ *resty.Client, res *resty.Response) (time.Duration, error) {
|
||||
if res.StatusCode() == http.StatusTooManyRequests {
|
||||
if after := res.Header().Get("Retry-After"); after != "" {
|
||||
|
||||
Reference in New Issue
Block a user