diff options
Diffstat (limited to 'natupnp.go')
-rw-r--r-- | natupnp.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/natupnp.go b/natupnp.go index e4072d0dd..c7f9eeb62 100644 --- a/natupnp.go +++ b/natupnp.go @@ -246,6 +246,10 @@ func soapRequest(url, function, message string) (r *http.Response, err error) { //fmt.Println(fullMessage) r, err = http.DefaultClient.Do(req) + if err != nil { + return + } + if r.Body != nil { defer r.Body.Close() } |