This commit is contained in:
邹宗楠
2023-06-01 15:54:49 +08:00
parent 2be3fb329e
commit f27a3ee5e2
2 changed files with 14 additions and 11 deletions

View File

@@ -151,7 +151,7 @@ func (t *TcpClient) delConn(key string) {
}
//添加到连接池中
func (t *TcpClient) addConn(c net.Conn, key string, status int) {
func addConn(c net.Conn, t *TcpClient, key string, status int) {
t.Lock()
defer t.Unlock()
t.Clients[key] = &PrintInfo{
@@ -190,7 +190,7 @@ func (t *TcpClient) getTimeOut(key string) bool {
return t.TimeoutMap[key]
}
func (t *TcpClient) buildAllMap(key string) {
func buildAllMap(t *TcpClient, key string) {
t.Lock()
defer t.Unlock()
t.MsgMap[key] = make(chan *model.PrintMsg, 1024)