aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-02 04:14:20 +0800
committerobscuren <geffobscura@gmail.com>2014-05-02 04:14:20 +0800
commit91aa189ef31adff7f4a084cae770aaa7c01f11e5 (patch)
tree595c5317179ae861146ed695591175b3c56674ce
parente6a68f0c3ab4987fa5e0e35cac765d40ff305aea (diff)
downloadgo-tangerine-91aa189ef31adff7f4a084cae770aaa7c01f11e5.tar
go-tangerine-91aa189ef31adff7f4a084cae770aaa7c01f11e5.tar.gz
go-tangerine-91aa189ef31adff7f4a084cae770aaa7c01f11e5.tar.bz2
go-tangerine-91aa189ef31adff7f4a084cae770aaa7c01f11e5.tar.lz
go-tangerine-91aa189ef31adff7f4a084cae770aaa7c01f11e5.tar.xz
go-tangerine-91aa189ef31adff7f4a084cae770aaa7c01f11e5.tar.zst
go-tangerine-91aa189ef31adff7f4a084cae770aaa7c01f11e5.zip
Fixed Upnp bug
-rw-r--r--ethereum.go2
-rw-r--r--natupnp.go4
2 files changed, 5 insertions, 1 deletions
diff --git a/ethereum.go b/ethereum.go
index c906a6954..b9174eaf8 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -350,7 +350,7 @@ func (s *Ethereum) WaitForShutdown() {
func (s *Ethereum) upnpUpdateThread() {
// Go off immediately to prevent code duplication, thereafter we renew
// lease every 15 minutes.
- timer := time.NewTimer(0 * time.Second)
+ timer := time.NewTimer(5 * time.Minute)
lport, _ := strconv.ParseInt(s.Port, 10, 16)
first := true
out:
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()
}