Log decoder errors

This commit is contained in:
Maciej Hirsz 2019-11-05 15:31:12 +01:00
parent f0612f7570
commit 1be9ecf668
1 changed files with 2 additions and 0 deletions

View File

@ -558,11 +558,13 @@ where
}
Ok(None) => break,
Err(ParseError::Io(e)) => {
error!("IO error when parsing!");
self.client_disconnected();
self.error = Some(DispatchError::Io(e));
break;
}
Err(e) => {
error!("Parsing error {:?}", e);
if let Some(mut payload) = self.payload.take() {
payload.set_error(PayloadError::EncodingCorrupted);
}