Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All changes in this project will be noted in this file.

## Unreleased

### New features

- Support for Skyhash 2.0

## 0.7.0

### New features
Expand Down
11 changes: 2 additions & 9 deletions src/aio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,13 @@ macro_rules! impl_async_methods {
}
Err(e) => match e {
ParseError::NotEnough => (),
ParseError::BadPacket | ParseError::UnexpectedByte => {
ParseError::BadPacket => {
self.buffer.clear();
return Err(SkyhashError::InvalidResponse.into());
}
ParseError::DataTypeError => {
return Err(SkyhashError::ParseError.into())
}
ParseError::Empty => {
return Err(IoError::from(ErrorKind::ConnectionReset).into())
}
ParseError::UnknownDatatype => {
return Err(SkyhashError::UnknownDataType.into())
}
Expand All @@ -113,11 +110,7 @@ macro_rules! impl_async_methods {
}
/// This function is a subroutine of `run_query` used to parse the response packet
fn try_response(&mut self) -> Result<(RawResponse, usize), ParseError> {
if self.buffer.is_empty() {
// The connection was possibly reset
return Err(ParseError::Empty);
}
Parser::new(&self.buffer).parse()
Parser::parse(&self.buffer)
}
}
impl crate::actions::AsyncSocket for $ty {
Expand Down
Loading