frame: fix partial write

Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
pull/43/head
Alexey Galakhov 7 years ago
parent 3772aaf163
commit d2e3602170
  1. 2
      src/protocol/frame/frame.rs

@ -107,7 +107,7 @@ impl FrameHeader {
| if self.mask.is_some() { 0x80 } else { 0 } | if self.mask.is_some() { 0x80 } else { 0 }
}; };
output.write(&[one, two])?; output.write_all(&[one, two])?;
match lenfmt { match lenfmt {
LengthFormat::U8(_) => (), LengthFormat::U8(_) => (),
LengthFormat::U16 => output.write_u16::<NetworkEndian>(length as u16)?, LengthFormat::U16 => output.write_u16::<NetworkEndian>(length as u16)?,

Loading…
Cancel
Save