Add warning when disconnecting peer

This commit is contained in:
Paul Hauner
2019-08-30 17:06:59 +10:00
parent 96fb3be2c7
commit 6ba093d14f

View File

@@ -525,6 +525,13 @@ impl NetworkContext {
}
pub fn disconnect(&mut self, peer_id: PeerId, reason: GoodbyeReason) {
warn!(
&self.log,
"Disconnecting peer";
"reason" => format!("{:?}", reason),
"peer_id" => format!("{:?}", peer_id),
);
self.send_rpc_request(None, peer_id, RPCRequest::Goodbye(reason))
// TODO: disconnect peers.
}