From 25fb6de6600691845f772e4cfb3cd137f26c40e5 Mon Sep 17 00:00:00 2001 From: e1732a364fed <75717694+e1732a364fed@users.noreply.github.com> Date: Sun, 8 May 2022 18:06:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dlisten=E5=9C=A8=E9=81=87?= =?UTF-8?q?=E5=88=B0EOF=E6=97=B6=E6=97=A0=E9=99=90=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E7=9A=84bug;=E5=87=8F=E5=B0=91go=20test=E5=9C=A8geosite?= =?UTF-8?q?=E7=9A=84=E8=BE=93=E5=87=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netLayer/geosite_test.go | 5 +++-- netLayer/listen.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/netLayer/geosite_test.go b/netLayer/geosite_test.go index d05b542..a64fc45 100644 --- a/netLayer/geosite_test.go +++ b/netLayer/geosite_test.go @@ -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 } } diff --git a/netLayer/listen.go b/netLayer/listen.go index ef08718..db45027 100644 --- a/netLayer/listen.go +++ b/netLayer/listen.go @@ -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) }