Handling MSGID_CANCEL just in case
This commit is contained in:
parent
cdbd91b13b
commit
511e64751c
1 changed files with 2 additions and 1 deletions
|
|
@ -243,7 +243,8 @@ where
|
|||
{
|
||||
pub fn len_prefix_and_msg_id(&self) -> (u32, u8) {
|
||||
match self {
|
||||
Message::Request(_) | Message::Cancel(_) => (LEN_PREFIX_REQUEST, MSGID_REQUEST),
|
||||
Message::Request(_) => (LEN_PREFIX_REQUEST, MSGID_REQUEST),
|
||||
Message::Cancel(_) => (LEN_PREFIX_REQUEST, MSGID_CANCEL),
|
||||
Message::Bitfield(b) => (1 + b.as_ref().len() as u32, MSGID_BITFIELD),
|
||||
Message::Choke => (LEN_PREFIX_CHOKE, MSGID_CHOKE),
|
||||
Message::Unchoke => (LEN_PREFIX_UNCHOKE, MSGID_UNCHOKE),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue