mirror of https://gogs.blitter.com/RLabs/xs
Removed debug stmts to do with keepalive
This commit is contained in:
parent
36799ba9e7
commit
c569a5a3c9
|
@ -1643,14 +1643,14 @@ func (hc *Conn) keepaliveHelper() {
|
||||||
nextDuration := 10000
|
nextDuration := 10000
|
||||||
bufTmp := []byte{0x55, 0xaa}
|
bufTmp := []byte{0x55, 0xaa}
|
||||||
_, err := hc.WritePacket(bufTmp, CSOKeepAlive)
|
_, err := hc.WritePacket(bufTmp, CSOKeepAlive)
|
||||||
logger.LogDebug(fmt.Sprintf("[keepalive]\n"))
|
//logger.LogDebug(fmt.Sprintf("[keepalive]\n"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.LogDebug(fmt.Sprintf("[ *** error - keepaliveHelper quitting *** ]\n"))
|
logger.LogDebug(fmt.Sprintf("[ *** error - keepaliveHelper quitting *** ]\n"))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
time.Sleep(time.Duration(nextDuration) * time.Millisecond)
|
time.Sleep(time.Duration(nextDuration) * time.Millisecond)
|
||||||
hc.keepalive -= 1
|
hc.keepalive -= 1
|
||||||
logger.LogDebug(fmt.Sprintf("[keepAlive is now %d]\n", hc.keepalive))
|
//logger.LogDebug(fmt.Sprintf("[keepAlive is now %d]\n", hc.keepalive))
|
||||||
|
|
||||||
//if rand.Intn(8) == 0 {
|
//if rand.Intn(8) == 0 {
|
||||||
// hc.keepalive = 0
|
// hc.keepalive = 0
|
||||||
|
|
Loading…
Reference in New Issue