From d0f8751b2b6d2594fbe7fa6eda2103b6479f20d9 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Sun, 5 Nov 2023 16:40:12 -0800 Subject: [PATCH] debugging --- xsnet/net.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xsnet/net.go b/xsnet/net.go index 6a671d7..e811995 100644 --- a/xsnet/net.go +++ b/xsnet/net.go @@ -1338,7 +1338,8 @@ func (hc Conn) Read(b []byte) (n int, err error) { // Throw away pkt if it's chaff (ie., caller to Read() won't see this data) log.Printf("[Chaff pkt, discarded (len %d)]\n", decryptN) case CSOKeepAlive: - //log.Printf("[KeepAlive pkt, discarded (len %d)]\n", decryptN) + logger.LogDebug(fmt.Sprintf("[got keepAlive pkt, discarded (len %d)]\n", decryptN)) + _ = binary.BigEndian.Uint16(payloadBytes[0:2]) hc.ResetKeepAlive() case CSOTermSize: fmt.Sscanf(string(payloadBytes), "%d %d", &hc.Rows, &hc.Cols) @@ -1639,7 +1640,7 @@ func (hc *Conn) keepaliveHelper() { nextDuration := 10000 bufTmp := []byte{0x55, 0xaa} _, err := hc.WritePacket(bufTmp, CSOKeepAlive) - //logger.LogDebug(fmt.Sprintf("[keepalive]\n")) + logger.LogDebug(fmt.Sprintf("[keepalive]\n")) if err != nil { logger.LogDebug(fmt.Sprintf("[ *** error - keepaliveHelper quitting *** ]\n")) break