Fix euph errors always turning into conn::Errors
This commit is contained in:
parent
0c135844a4
commit
0f217a6279
2 changed files with 5 additions and 3 deletions
|
|
@ -444,10 +444,11 @@ impl Conn {
|
|||
self.replies.complete(id, packet.clone());
|
||||
}
|
||||
|
||||
match &packet.content {
|
||||
Ok(data) => self.on_data(&packet.id, data).await,
|
||||
Err(msg) => Err(Error::Euph(msg.clone())),
|
||||
if let Ok(data) = &packet.content {
|
||||
self.on_data(&packet.id, data).await?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn on_data(&mut self, id: &Option<String>, data: &Data) -> Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue