From 956600b68f648d9bf938f0d01761a0ec79578031 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Wed, 14 Jul 2021 14:58:16 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index eff72b118..b88d70407 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -119,7 +119,7 @@ type PrintInfo struct { //连接的客户端,吧每个客户端都放进来 type TcpClient struct { Clients map[string]*PrintInfo - s sync.RWMutex + s *sync.RWMutex } type GetPrintStatus struct { @@ -129,6 +129,7 @@ type GetPrintStatus struct { func ListenTcp() { tcpClient.Clients = make(map[string]*PrintInfo) + tcpClient.s = new(sync.RWMutex) l, err := net.Listen("tcp", ":8000") if err != nil { fmt.Println("listen error:", err)