return PayloadTooBig if user calls send_data with buffer over max window size

This commit is contained in:
Sean McArthur
2017-10-05 17:07:57 -07:00
parent 7ad29932f6
commit 447102beeb

View File

@@ -107,8 +107,7 @@ where
let sz = frame.payload().remaining();
if sz > MAX_WINDOW_SIZE as usize {
// TODO: handle overflow
unimplemented!();
return Err(UserError::PayloadTooBig);
}
let sz = sz as WindowSize;