diff --git a/message.go b/message.go index d9c1ef2..8fbe588 100644 --- a/message.go +++ b/message.go @@ -106,6 +106,9 @@ func (m *Message) Reset() { // grow ensures that internal buffer has n length. func (m *Message) grow(n int) { + if len(m.Raw) >= n { + return + } if cap(m.Raw) >= n { m.Raw = m.Raw[:n] return