Treat connecting differently
This commit is contained in:
parent
9451920c52
commit
b6c58b8a2b
1 changed files with 3 additions and 1 deletions
|
|
@ -16,6 +16,8 @@ use crate::replies::{self, Replies};
|
|||
// TODO Split into "interacting" and "maintenance" parts?
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum Error {
|
||||
#[error("{0}")]
|
||||
CouldNotConnect(conn::Error),
|
||||
#[error("{0}")]
|
||||
Conn(#[from] conn::Error),
|
||||
#[error("{0}")]
|
||||
|
|
@ -233,7 +235,7 @@ impl CoveConnMt {
|
|||
Err(e) => {
|
||||
*self.conn.lock().await.state_mut() = State::Stopped;
|
||||
self.ev_tx.send(Event::StateChanged);
|
||||
return Err(Error::Conn(e));
|
||||
return Err(Error::CouldNotConnect(e));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue