Clarify comment in decoder state.

This commit is contained in:
Henry de Valence 2019-09-25 16:07:03 -07:00 committed by Deirdre Connolly
parent 422c783a47
commit b426630613
1 changed files with 2 additions and 1 deletions

View File

@ -285,7 +285,8 @@ impl Decoder for Codec {
} }
// Now that we know we have the full body, split off the body, // 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); let body = src.split_to(body_len);
self.state = DecodeState::Head; self.state = DecodeState::Head;