From: Matt Corallo Date: Fri, 23 Aug 2019 03:39:20 +0000 (-0400) Subject: Reset routing tables on reconnect X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=57f9c962892481512eb472bdfcdf3d967b6da157;p=dnsseed-rust Reset routing tables on reconnect --- diff --git a/src/bgp_client.rs b/src/bgp_client.rs index a890dad..a96de04 100644 --- a/src/bgp_client.rs +++ b/src/bgp_client.rs @@ -257,7 +257,9 @@ impl BGPClient { } match bgp_msg { Message::Open(_) => { - printer.add_line("Connected to BGP route provider".to_string(), true); + client.routes.lock().unwrap().v4_table.clear(); + client.routes.lock().unwrap().v6_table.clear(); + printer.add_line("Connected to BGP route provider".to_string(), false); }, Message::KeepAlive => { let _ = sender.try_send(Message::KeepAlive);