0.2.79 - Slow api fixes

This commit is contained in:
ponzischeme89
2026-08-19 18:08:00 +12:00
parent 590e069366
commit 0782545013
41 changed files with 1820 additions and 317 deletions
+4 -2
View File
@@ -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),
}
}