diff --git a/clients/go/camput/transport.go b/clients/go/camput/transport.go index 8e6421b4f..1f8661d96 100644 --- a/clients/go/camput/transport.go +++ b/clients/go/camput/transport.go @@ -25,12 +25,19 @@ import ( type tinkerTransport struct { mu sync.Mutex reqs int + + transport http.RoundTripper } func (t *tinkerTransport) RoundTrip(req *http.Request) (resp *http.Response, err os.Error) { t.mu.Lock() t.reqs++ + rt := t.transport t.mu.Unlock() - return http.DefaultTransport.RoundTrip(req) + if rt == nil { + rt = http.DefaultTransport + } + + return rt.RoundTrip(req) }