change UnexpectedEof to ConnectionAborted

This commit is contained in:
Austin Bonander 2020-01-03 19:06:00 -08:00
parent 43f1164823
commit 589d06ec66
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ impl MySqlConnection {
pub(crate) async fn receive(&mut self) -> crate::Result<&mut Self> {
self.try_receive()
.await?
.ok_or(io::ErrorKind::UnexpectedEof)?;
.ok_or(io::ErrorKind::ConnectionAborted)?;
Ok(self)
}

View file

@ -125,7 +125,7 @@ impl super::PgConnection {
}
// Connection was (unexpectedly) closed
Err(io::Error::from(io::ErrorKind::UnexpectedEof).into())
Err(io::Error::from(io::ErrorKind::ConnectionAborted).into())
}
}