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

+ 1 - 2
pkg/mqtt/connection.go

@@ -317,9 +317,8 @@ func (c *Connection) SendMsgToClient() {
 		c.lock.Lock()
 
 		server.Log.Debugf("send msg to %s=======\n%v\n=========", host, msg)
-		fmt.Printf("客户端实例:%v, 消息内容:%v", c.Conn, msg)
 		if c.Conn == nil {
-			fmt.Println("实例为空")
+			fmt.Printf("客户端实例:%v, 消息内容:%v\r\n", c.Conn, msg)
 		}
 		err := msg.Encode(c.Conn)
 		if err != nil {