diff --git a/zebra-network/src/protocol/codec.rs b/zebra-network/src/protocol/codec.rs index 029310f8..a1ffeed6 100644 --- a/zebra-network/src/protocol/codec.rs +++ b/zebra-network/src/protocol/codec.rs @@ -285,7 +285,8 @@ impl Decoder for Codec { } // Now that we know we have the full body, split off the body, - // and reset the decoder state for the next message. + // and reset the decoder state for the next message. Otherwise + // we will attempt to read the next header as the current body. let body = src.split_to(body_len); self.state = DecodeState::Head;