fix the case when we have exactly 4 bytes left after consuming one packet, and it happens to be 0 byte packet header