Skip to content

Commit

Permalink
fix bug when repo sync interest buffer reset
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyuan129 committed Oct 7, 2024
1 parent e05e7bc commit 25b4c5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ndn_python_repo/utils/passive_svs.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ def sync_handler(self, name: FormalName, _param: InterestParam, _app_param: Bina
elif lsv_seq > rsv_seq:
# Local is latest
self.logger.debug(f'Outdated remote on: [{Name.to_str(rsv_id)}]: {rsv_seq} < {lsv_seq}')
raw_inst = self.inst_buffer[rsv_id]
if raw_inst not in already_sent:
if rsv_id in self.inst_buffer:
raw_inst = self.inst_buffer[rsv_id]
else: raw_inst = None
if raw_inst and raw_inst not in already_sent:
already_sent.append(raw_inst)
self.send_interest(raw_inst)
else: pass
Expand Down

0 comments on commit 25b4c5f

Please sign in to comment.