diff options
author | Felix Lange <fjl@twurst.com> | 2015-08-03 08:45:33 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-08-04 09:10:27 +0800 |
commit | 5c949d3b3ba81ea0563575b19a7b148aeac4bf61 (patch) | |
tree | 05b9bbc8b837081cde166694d040ca1d9c972f45 /Godeps/_workspace/src/github.com/huin/goupnp/soap | |
parent | bf48ed32dd8be6bec2931c9f1eee4fd749affa21 (diff) | |
download | go-tangerine-5c949d3b3ba81ea0563575b19a7b148aeac4bf61.tar.gz go-tangerine-5c949d3b3ba81ea0563575b19a7b148aeac4bf61.tar.zst go-tangerine-5c949d3b3ba81ea0563575b19a7b148aeac4bf61.zip |
fdtrack: temporary hack for tracking file descriptor usage
Package fdtrack logs statistics about open file descriptors.
This should help identify the source of #1549.
Diffstat (limited to 'Godeps/_workspace/src/github.com/huin/goupnp/soap')
-rw-r--r-- | Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go b/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go index 815610734..786ce6fa8 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go @@ -7,9 +7,12 @@ import ( "encoding/xml" "fmt" "io/ioutil" + "net" "net/http" "net/url" "reflect" + + "github.com/ethereum/go-ethereum/fdtrack" ) const ( @@ -26,6 +29,17 @@ type SOAPClient struct { func NewSOAPClient(endpointURL url.URL) *SOAPClient { return &SOAPClient{ EndpointURL: endpointURL, + HTTPClient: http.Client{ + Transport: &http.Transport{ + Dial: func(network, addr string) (net.Conn, error) { + c, err := net.Dial(network, addr) + if c != nil { + c = fdtrack.WrapConn("upnp", c) + } + return c, err + }, + }, + }, } } |