Skip to content

Commit

Permalink
fix route-refresh handling
Browse files Browse the repository at this point in the history
The type of data passed was not what was expected. The reactor
was sending a single type when the API was designed for a list
  • Loading branch information
thomas-mangin committed Oct 5, 2024
1 parent 105101c commit 7605037
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/exabgp/reactor/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def shutdown(self):
self._stop("shutting down")
self.stop()

def resend(self, enhanced, send_families=None):
self.neighbor.rib.outgoing.resend(enhanced, send_families)
def resend(self, enhanced, family=None):
self.neighbor.rib.outgoing.resend(enhanced, family)
self._delay.reset()

def reestablish(self, restart_neighbor=None):
Expand Down
10 changes: 5 additions & 5 deletions src/exabgp/rib/outgoing.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ def clear(self):
def pending(self):
return len(self._new_nlri) != 0 or len(self._refresh_changes) != 0

def resend(self, enhanced_refresh, families=None):
# families can be None or []
if not families:
families = self.families
requested_families = set(families).intersection(self.families)
def resend(self, enhanced_refresh, family=None):
requested_families = set(self.families)

if family is not None:
requested_families = set(self.families).intersection([family])

if enhanced_refresh:
for family in requested_families:
Expand Down

0 comments on commit 7605037

Please sign in to comment.