From 25aabfb3e2ac291fc369b893ec5c6105dceb91fd Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 23 Feb 2018 10:45:33 +0100 Subject: [PATCH] fix big ws frames --- src/ws/frame.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ws/frame.rs b/src/ws/frame.rs index 612fe2f0a..8771435fa 100644 --- a/src/ws/frame.rs +++ b/src/ws/frame.rs @@ -191,7 +191,7 @@ impl Frame { unsafe{buf.advance_mut(2)}; buf } else { - let mut buf = BytesMut::with_capacity(p_len + 8); + let mut buf = BytesMut::with_capacity(p_len + 10); buf.put_slice(&[one, two | 127]); { let buf_mut = unsafe{buf.bytes_mut()};