Godeps: update github.com/huin/goupnp to 5cff77a69fb22f5

This includes a fix adding a timeout to router discovery requests.
This commit is contained in:
Felix Lange 2015-06-04 14:04:57 +02:00
parent 8b4605c336
commit 6a831ca015
2 changed files with 7 additions and 4 deletions

2
Godeps/Godeps.json generated
View File

@ -31,7 +31,7 @@
},
{
"ImportPath": "github.com/huin/goupnp",
"Rev": "c57ae84388ab59076fd547f1abeab71c2edb0a21"
"Rev": "5cff77a69fb22f5f1774c4451ea2aab63d4d2f20"
},
{
"ImportPath": "github.com/jackpal/go-nat-pmp",

View File

@ -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
}