is the truncate really necessary?

This commit is contained in:
Josh Deprez 2021-01-06 21:39:43 +11:00
parent 1ecb5ecdba
commit 9fbf73c1e9

View file

@ -57,7 +57,7 @@ func (c *sungrowConn) Write(msg []byte) (int, error) {
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)