Skip to content

Commit c353f2e

Browse files
tarasglekaider-chat-bot
authored andcommitted
refactor: remove 5min connection limit, replace it with connection timeouts (#124)
Co-authored-by: aider (openrouter/google/gemini-2.5-pro) <aider@aider.chat>
1 parent 9529243 commit c353f2e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

internal/worker/worker.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,14 @@ func (me *Worker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
372372
CheckRedirect: func(req *http.Request, via []*http.Request) error {
373373
return http.ErrUseLastResponse
374374
},
375-
Timeout: 5 * time.Minute,
375+
Transport: &http.Transport{
376+
DialContext: (&net.Dialer{
377+
Timeout: 5 * time.Minute,
378+
KeepAlive: 5 * time.Minute,
379+
}).DialContext,
380+
TLSHandshakeTimeout: 5 * time.Minute,
381+
ResponseHeaderTimeout: 5 * time.Minute,
382+
},
376383
}
377384

378385
resp, err := client.Do(request)

0 commit comments

Comments
 (0)