From 1918bc33281fb82e6a690369fb02bde01df8757b Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Tue, 18 Dec 2018 01:57:06 +0800 Subject: [PATCH] test2 --- dip.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dip.go b/dip.go index 6650893..5a6db35 100644 --- a/dip.go +++ b/dip.go @@ -75,10 +75,11 @@ func (group *DIPGroup) Choose(addr string) { SetAddrForward(group.IPTableNum, addr, ip) } else { restartAddr := "http://" + group.Current.Host + ":8800/pppoe/restart" - if _, err := grequests.Get(restartAddr, nil); err != nil { + if resp, err := grequests.Get(restartAddr, nil); err != nil { log.Println(err) group.Current.ActiveTime += 12 } else { + defer resp.Close() group.Current = dhost group.Current.ActiveTime = now // log.Println("new set addr:", group.Current.Host, "restartAddr:", restartAddr, "resp", resp.Content())