debugging

This commit is contained in:
Russ Magee 2023-11-05 16:40:12 -08:00
parent a3d8543816
commit d0f8751b2b
1 changed files with 3 additions and 2 deletions

View File

@ -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