aa
This commit is contained in:
@@ -171,7 +171,7 @@ func handleConn(c net.Conn) {
|
|||||||
}
|
}
|
||||||
//也可能是查状态的
|
//也可能是查状态的
|
||||||
if err = json.Unmarshal(buffer[:n], &printStatus); err == nil {
|
if err = json.Unmarshal(buffer[:n], &printStatus); err == nil {
|
||||||
fmt.Println("handleConn msg: %v", string(buffer[:n]))
|
fmt.Println("handleConn msg: ", string(buffer[:n]))
|
||||||
if printStatus != nil {
|
if printStatus != nil {
|
||||||
var status int
|
var status int
|
||||||
if tcpClient.Clients[printStatus.PrintNo] != nil {
|
if tcpClient.Clients[printStatus.PrintNo] != nil {
|
||||||
@@ -179,6 +179,7 @@ func handleConn(c net.Conn) {
|
|||||||
} else {
|
} else {
|
||||||
status = printerStatusOffline
|
status = printerStatusOffline
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("handleConn getstatus :%v", utils.Format4Output(tcpClient.Clients[printStatus.PrintNo], true))
|
||||||
c.Write([]byte(utils.Int2Str(status)))
|
c.Write([]byte(utils.Int2Str(status)))
|
||||||
c.Close()
|
c.Close()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user