:
This commit is contained in:
@@ -67,17 +67,16 @@ func handleConn(c net.Conn) error {
|
|||||||
globals.SugarLogger.Debugf("remoteIP1: %s", remoteIP)
|
globals.SugarLogger.Debugf("remoteIP1: %s", remoteIP)
|
||||||
globals.SugarLogger.Debugf("remotePort1: %d", remotePort)
|
globals.SugarLogger.Debugf("remotePort1: %d", remotePort)
|
||||||
|
|
||||||
printRemoteAddr := c.RemoteAddr().String()
|
// 重连
|
||||||
printRemoteAddr = strings.Split(printRemoteAddr, ":")[0]
|
|
||||||
globals.SugarLogger.Debugf("printRemoteAddr2: %s", printRemoteAddr)
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
fmt.Println("connection close")
|
fmt.Println("connection close")
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("ReadString err:", err)
|
fmt.Println("ReadString err:", err)
|
||||||
}
|
}
|
||||||
|
printRemoteAddr22 := c.RemoteAddr().String()
|
||||||
|
printRemoteAddr22 = strings.Split(printRemoteAddr22, ":")[0]
|
||||||
|
globals.SugarLogger.Debugf("printRemoteAddr22: %s", printRemoteAddr22)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +105,7 @@ func handleConn(c net.Conn) error {
|
|||||||
}
|
}
|
||||||
if heartbeat {
|
if heartbeat {
|
||||||
// 证明是心跳
|
// 证明是心跳
|
||||||
Heartbeat(c, t, data, printNo, printRemoteAddr)
|
Heartbeat(c, t, data, printNo, "")
|
||||||
} else if callback {
|
} else if callback {
|
||||||
// 打印回调
|
// 打印回调
|
||||||
Callback(c, t, data, printNo)
|
Callback(c, t, data, printNo)
|
||||||
|
|||||||
Reference in New Issue
Block a user