Skip to content

Commit

Permalink
[1.14] Bindings http default transport (#3467)
Browse files Browse the repository at this point in the history
Signed-off-by: joshvanl <[email protected]>
Co-authored-by: Yaron Schneider <[email protected]>
  • Loading branch information
JoshVanL and yaron2 authored Jun 27, 2024
1 parent 1375f08 commit 128691d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bindings/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,10 @@ func (h *HTTPSource) Init(_ context.Context, meta bindings.Metadata) error {
dialer := &net.Dialer{
Timeout: 15 * time.Second,
}
netTransport := &http.Transport{
Dial: dialer.Dial,
TLSHandshakeTimeout: 15 * time.Second,
TLSClientConfig: tlsConfig,
}
netTransport := http.DefaultTransport.(*http.Transport).Clone()
netTransport.DialContext = dialer.DialContext
netTransport.TLSHandshakeTimeout = 15 * time.Second
netTransport.TLSClientConfig = tlsConfig

h.client = &http.Client{
Timeout: 0, // no time out here, we use request timeouts instead
Expand Down

0 comments on commit 128691d

Please sign in to comment.