fix: error request to delete ready ip.

This commit is contained in:
eson 2018-12-22 03:14:05 +08:00
parent c5bb70cf52
commit 4149ea8d0f

3
dip.go
View File

@ -77,6 +77,7 @@ func (group *DIPGroup) Choose(addr string) {
if _, err := requests.NewSession().Get(restartAddr).Execute(); err != nil {
log.Println(err)
group.Current.ActiveTime += 12
return
} else {
group.Current = dhost
group.Current.ActiveTime = now
@ -88,7 +89,7 @@ func (group *DIPGroup) Choose(addr string) {
group.Waitor[ip] = group.Ready[ip]
delete(group.Ready, ip)
break
return
}
}