From ac5ae1a5fb7d7b53266ee1dacb3cb5de3a814d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=9D=E6=95=8F?= Date: Wed, 31 Aug 2022 18:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0TAP=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netcard.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netcard.go b/netcard.go index de2f7d7..a46d494 100644 --- a/netcard.go +++ b/netcard.go @@ -41,7 +41,7 @@ func NewNetTunnel() *NetTunnel { } nt.shutdown.OnClose(func() { - time.Sleep(time.Second * 2) + time.Sleep(time.Second * 1) log.Println("OnClose") os.Exit(0) }) @@ -83,6 +83,7 @@ func NewNetTunnel() *NetTunnel { var frame ethernet.Frame = rbuf + log.Println(len(frame)) switch frame.Ethertype() { case ethernet.ARP: log.Printf("bytes len: %d type(arp): % x", len(rbuf), frame.Ethertype()) // 数据长度 @@ -94,6 +95,7 @@ func NewNetTunnel() *NetTunnel { client := value.(*RPCClient) client.CheckConnect() client.Frame <- frame + log.Println(client.realAddr) return true }) case ethernet.IPv4: