From c16b5f973e2a36f4c88af3bde982d062879dc5ce Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Sun, 10 Jan 2021 20:51:14 +1100 Subject: [PATCH] re-add that truncate in case it's related to misreads --- sungrow.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sungrow.go b/sungrow.go index b4cef28..6b004be 100644 --- a/sungrow.go +++ b/sungrow.go @@ -56,8 +56,7 @@ func (c *sungrowConn) Write(msg []byte) (int, error) { c.mu.Lock() defer c.mu.Unlock() c.txid = binary.BigEndian.Uint16(msg[:2]) - - //c.fifo.Truncate(0) + c.fifo.Truncate(0) bs := c.block.BlockSize() padlen := bs - (len(msg) % bs)