diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-10 03:12:25 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-10 03:12:25 +0800 |
commit | bac9a94ddf20dc530966cbf6cd384aaf94aedc77 (patch) | |
tree | 0ced967e60315698cc5056a984d7678c417bc1ce /Godeps/_workspace | |
parent | 0e703d92ac9df61e2ededa8c895c70ded101a607 (diff) | |
parent | 14994fa21bf6f05554ff370d41005d06b68d20a5 (diff) | |
download | dexon-bac9a94ddf20dc530966cbf6cd384aaf94aedc77.tar dexon-bac9a94ddf20dc530966cbf6cd384aaf94aedc77.tar.gz dexon-bac9a94ddf20dc530966cbf6cd384aaf94aedc77.tar.bz2 dexon-bac9a94ddf20dc530966cbf6cd384aaf94aedc77.tar.lz dexon-bac9a94ddf20dc530966cbf6cd384aaf94aedc77.tar.xz dexon-bac9a94ddf20dc530966cbf6cd384aaf94aedc77.tar.zst dexon-bac9a94ddf20dc530966cbf6cd384aaf94aedc77.zip |
Merge branch 'release/0.9.28'
Diffstat (limited to 'Godeps/_workspace')
-rw-r--r-- | Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go b/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go index 8cd20c2f4..7799a32ce 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go @@ -19,7 +19,7 @@ import ( "fmt" "net/http" "net/url" - + "time" "golang.org/x/net/html/charset" "github.com/huin/goupnp/httpu" @@ -64,7 +64,6 @@ func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) { maybe := &results[i] loc, err := response.Location() if err != nil { - maybe.Err = ContextError{"unexpected bad location from search", err} continue } @@ -93,7 +92,11 @@ func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) { } func requestXml(url string, defaultSpace string, doc interface{}) error { - resp, err := http.Get(url) + timeout := time.Duration(3 * time.Second) + client := http.Client{ + Timeout: timeout, + } + resp, err := client.Get(url) if err != nil { return err } |