增加重连
This commit is contained in:
parent
485be7cc62
commit
e9c0ca9c2d
|
@ -136,13 +136,13 @@ func (t *TcpHelper) watch(conn net.Conn) {
|
||||||
recvStr := string(buffer[:n])
|
recvStr := string(buffer[:n])
|
||||||
//fmt.Println("结果:recvStr:", recvStr)
|
//fmt.Println("结果:recvStr:", recvStr)
|
||||||
if recvStr == "5" {
|
if recvStr == "5" {
|
||||||
fmt.Println("客户端繁忙")
|
utils.Log(nil, "客户端繁忙")
|
||||||
atomic.StoreInt32(t.Full, 1)
|
atomic.StoreInt32(t.Full, 1)
|
||||||
} else if recvStr == "2" {
|
} else if recvStr == "2" {
|
||||||
fmt.Println("客户端空闲")
|
utils.Log(nil, "客户端空闲")
|
||||||
atomic.StoreInt32(t.Full, 0)
|
atomic.StoreInt32(t.Full, 0)
|
||||||
} else if recvStr == "6" {
|
} else if recvStr == "6" {
|
||||||
fmt.Println("客户端心跳")
|
utils.Log(nil, "客户端心跳")
|
||||||
atomic.StoreInt32(t.Full, 0)
|
atomic.StoreInt32(t.Full, 0)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue