From 17ff0169b8af83b7e13fb0287811a3633b78ec9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 30 Aug 2023 16:23:34 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp.go | 7 ++++--- business/jxstore/event/event_tcp_utils.go | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 0c3fbc9f5..134676752 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -17,12 +17,13 @@ import ( ) var Poll *Pool -var PrintPool map[string]*PrintPoolMap + +//var PrintPool map[string]*PrintPoolMap func init() { Poll = NewPool(500) Poll.Start() - PrintPool = make(map[string]*PrintPoolMap, 10000) + //PrintPool = make(map[string]*PrintPoolMap, 10000) } //入口 @@ -111,7 +112,7 @@ func handleConn(c net.Conn, t *TcpClient) error { heartbeat = true } - obj, ok := PrintPool[printNo] + //obj, ok := PrintPool[printNo] //证明是心跳 if heartbeat { diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index 632067cfe..ec566cc8e 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -125,10 +125,10 @@ type PrintInfo struct { StatusTime time.Time } -type PrintPoolMap struct { - *sync.RWMutex - PrintObj *TcpClient -} +//type PrintPoolMap struct { +// *sync.RWMutex +// PrintObj *TcpClient +//} //连接的客户端,吧每个客户端都放进来 type TcpClient struct {