We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58e8689 commit b3a284eCopy full SHA for b3a284e
src/ndn/app_support/svs/sync.py
@@ -57,7 +57,7 @@ class SvsInst:
57
running: bool
58
ndn_app: app.NDNApp | None
59
60
- next_sync_timing: float
+ next_sync_timing: float = 0.0
61
timer_rst_event: aio.Event | None
62
int_signer: enc.Signer
63
int_validator: app.Validator
@@ -161,7 +161,7 @@ async def on_timer(self):
161
while self.running:
162
try:
163
# Timer reset event
164
- await aio.wait_for(self.timer_rst_event.wait(), timeout=self.next_sync_timing - time.time())
+ await aio.wait_for(self.timer_rst_event.wait(), timeout=max(self.next_sync_timing - time.time(), 0))
165
self.timer_rst_event.clear()
166
except aio.CancelledError:
167
break
0 commit comments