增加重连
This commit is contained in:
parent
4ba52c9de1
commit
485be7cc62
|
@ -141,6 +141,9 @@ func (t *TcpHelper) watch(conn net.Conn) {
|
||||||
} else if recvStr == "2" {
|
} else if recvStr == "2" {
|
||||||
fmt.Println("客户端空闲")
|
fmt.Println("客户端空闲")
|
||||||
atomic.StoreInt32(t.Full, 0)
|
atomic.StoreInt32(t.Full, 0)
|
||||||
|
} else if recvStr == "6" {
|
||||||
|
fmt.Println("客户端心跳")
|
||||||
|
atomic.StoreInt32(t.Full, 0)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
atomic.StoreInt32(t.Full, 1)
|
atomic.StoreInt32(t.Full, 1)
|
||||||
|
|
Loading…
Reference in New Issue