aa
This commit is contained in:
@@ -43,7 +43,7 @@ func (t *TcpClient) handleConn(c net.Conn) {
|
||||
}
|
||||
defer c.Close()
|
||||
buffer := make([]byte, 1024)
|
||||
for {
|
||||
//for {
|
||||
n, err := c.Read(buffer)
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
@@ -59,7 +59,7 @@ func (t *TcpClient) handleConn(c net.Conn) {
|
||||
if printStatus != nil {
|
||||
status := t.getPrintStatus(printStatus.PrintNo)
|
||||
c.Write([]byte(utils.Int2Str(status)))
|
||||
break
|
||||
c.Close()
|
||||
}
|
||||
}
|
||||
//看是心跳还是打印返回
|
||||
@@ -93,7 +93,7 @@ func (t *TcpClient) handleConn(c net.Conn) {
|
||||
_, printNo = getCallbackMsgInfo(data)
|
||||
t.addCallbackChan(printNo, data)
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
func (t *TcpClient) printFail() (err error) {
|
||||
|
||||
Reference in New Issue
Block a user