This commit is contained in:
suyl
2021-08-02 15:40:22 +08:00
parent 468ffffe88
commit 35eddc42a6

View File

@@ -41,9 +41,9 @@ func (t *TcpClient) handleConn(c net.Conn) {
globals.SugarLogger.Debugf("conn is nil") globals.SugarLogger.Debugf("conn is nil")
return return
} }
//defer c.Close() defer c.Close()
buffer := make([]byte, 1024) buffer := make([]byte, 1024)
//for { for {
n, err := c.Read(buffer) n, err := c.Read(buffer)
if err != nil { if err != nil {
if err == io.EOF { if err == io.EOF {
@@ -93,7 +93,7 @@ func (t *TcpClient) handleConn(c net.Conn) {
_, printNo = getCallbackMsgInfo(data) _, printNo = getCallbackMsgInfo(data)
t.addCallbackChan(printNo, data) t.addCallbackChan(printNo, data)
} }
//} }
} }
func (t *TcpClient) printFail() (err error) { func (t *TcpClient) printFail() (err error) {