diff --git a/p2p/src/conn.rs b/p2p/src/conn.rs index d6313929a..f105c4db6 100644 --- a/p2p/src/conn.rs +++ b/p2p/src/conn.rs @@ -51,6 +51,10 @@ macro_rules! try_break { match $inner { Ok(v) => Some(v), Err(Error::Connection(ref e)) if e.kind() == io::ErrorKind::WouldBlock => None, + Err(Error::Store(_)) + | Err(Error::Chain(_)) + | Err(Error::Internal) + | Err(Error::NoDandelionRelay) => None, Err(e) => { let _ = $chan.send(e); break; diff --git a/p2p/src/peer.rs b/p2p/src/peer.rs index 52eb672c7..86b28591d 100644 --- a/p2p/src/peer.rs +++ b/p2p/src/peer.rs @@ -61,7 +61,7 @@ macro_rules! connection { ($holder:expr) => { match $holder.connection.as_ref() { Some(conn) => conn.lock(), - None => return Err(Error::Internal), + None => return Err(Error::ConnectionClose), } }; }