Handle Response::Error and send Message::Reject generated from a PeerError::Rejected
@@ -374,6 +374,11 @@ where
match rsp {
Response::Ok => { /* generic success, do nothing */ }
+ Response::Error => {
+ if let Err(e) = self.peer_tx.send(Message::from(PeerError::Rejected)).await {
+ self.fail_with(e.into());
+ }
+ }
Response::Peers(addrs) => {
if let Err(e) = self.peer_tx.send(Message::Addr(addrs)).await {
self.fail_with(e.into());
