修复listen在遇到EOF时无限循环的bug;减少go test在geosite的输出.

This commit is contained in:
e1732a364fed
2022-05-08 18:06:17 +08:00
parent 3dce72a334
commit 25fb6de660
2 changed files with 5 additions and 3 deletions

View File

@@ -14,13 +14,14 @@ func TestGeosite(t *testing.T) {
//inclusionCount := 0
var typeCount map[string]int = make(map[string]int)
for n, list := range GeositeListMap {
//for n, list := range GeositeListMap {
for _, list := range GeositeListMap {
//if len(list.Inclusion) > 0 {
//t.Log("==========================", list.Inclusion)
// inclusionCount++
//}
for _, d := range list.Domains {
t.Log(n, d.Type, d.Value, d.Attrs)
//t.Log(n, d.Type, d.Value, d.Attrs)
typeCount[d.Type] = typeCount[d.Type] + 1
}
}

View File

@@ -43,8 +43,9 @@ func loopAccept(listener net.Listener, xver int, acceptFunc func(net.Conn)) {
}
time.Sleep(time.Millisecond * 500)
continue
}
continue
break
}
go acceptFunc(newc)
}