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