aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-06-04 20:04:57 +0800
committerFelix Lange <fjl@twurst.com>2015-06-05 04:25:43 +0800
commit6a831ca015c746472589e9039b41d0fd6d4a9af0 (patch)
treef886355d9e0445ebf9b2f05b49036ca3f6fcd055 /Godeps/_workspace
parent8b4605c336568065ea1d2fa1298c3a8489f9bf9e (diff)
downloaddexon-6a831ca015c746472589e9039b41d0fd6d4a9af0.tar.gz
dexon-6a831ca015c746472589e9039b41d0fd6d4a9af0.tar.zst
dexon-6a831ca015c746472589e9039b41d0fd6d4a9af0.zip
Godeps: update github.com/huin/goupnp to 5cff77a69fb22f5
This includes a fix adding a timeout to router discovery requests.
Diffstat (limited to 'Godeps/_workspace')
-rw-r--r--Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go9
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
}