0.2.79 - Slow api fixes
This commit is contained in:
@@ -36,6 +36,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ponzischeme89/memby/server/internal/timing"
|
||||
)
|
||||
|
||||
// DefaultBaseURL is the REST API's home. It is a field on the client so the tests can
|
||||
@@ -136,14 +138,14 @@ func New(apiKey, userAgent, username, password string, timeout time.Duration) *C
|
||||
userAgent: strings.TrimSpace(userAgent),
|
||||
username: strings.TrimSpace(username),
|
||||
password: password,
|
||||
http: &http.Client{
|
||||
http: timing.Instrument(&http.Client{
|
||||
Timeout: timeout,
|
||||
Transport: &http.Transport{
|
||||
MaxIdleConns: 10,
|
||||
MaxIdleConnsPerHost: 5,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
},
|
||||
},
|
||||
}, timing.StageOpenSubtitles),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user