lijian %!s(int64=4) %!d(string=hai) anos
pai
achega
4f693e4b48
Modificáronse 1 ficheiros con 0 adicións e 2 borrados
  1. 0 2
      pkg/mqtt/connection.go

+ 0 - 2
pkg/mqtt/connection.go

@@ -311,7 +311,6 @@ func (c *Connection) SendMsgToClient() {
 	}
 	host := c.Conn.RemoteAddr()
 	for {
-		c.lock.Lock()
 		if c.SendChan == nil {
 			return
 		}
@@ -326,6 +325,5 @@ func (c *Connection) SendMsgToClient() {
 			server.Log.Errorf("send msg err: %s=====\n%v\n=====", err, msg)
 			continue
 		}
-		c.lock.Unlock()
 	}
 }