We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33e1129 commit c065eceCopy full SHA for c065ece
go/porcelain/http/http.go
@@ -31,11 +31,11 @@ func NewRetryableTransport(tr runtime.ClientTransport, attempts int) *RetryableT
31
}
32
33
func (t *RetryableTransport) Submit(op *runtime.ClientOperation) (interface{}, error) {
34
- client := &http.Client{}
+ var client http.Client
35
if op.Client == nil {
36
- *client = *http.DefaultClient
+ client = *http.DefaultClient
37
} else {
38
- *client = *op.Client
+ client = *op.Client
39
40
41
transport := client.Transport
@@ -47,7 +47,7 @@ func (t *RetryableTransport) Submit(op *runtime.ClientOperation) (interface{}, e
47
attempts: t.attempts,
48
49
50
- op.Client = client
+ op.Client = &client
51
res, err := t.tr.Submit(op)
52
53
return res, err
0 commit comments