Skip to content

Commit

Permalink
Fixed invalid automatic telemetry request scheduling timebase
Browse files Browse the repository at this point in the history
  • Loading branch information
markqvist committed Sep 25, 2024
1 parent 1d5cd89 commit 0902f86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sbapp/sideband/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ def __reload_config(self):
self.update_ignore_invalid_stamps()
except Exception as e:
RNS.log("Error while reloading configuration: "+str(e), RNS.LOG_ERROR)
RNS.trace_exception(e)

def __save_config(self):
RNS.log("Saving Sideband configuration...", RNS.LOG_DEBUG)
Expand Down Expand Up @@ -1203,7 +1204,8 @@ def telemetry_request_finished(self, message):
self.message_router.handle_outbound(message)
else:
if message.state == LXMF.LXMessage.DELIVERED:
self.setpersistent(f"telemetry.{RNS.hexrep(message.destination_hash, delimit=False)}.last_request_success_timebase", message.request_timebase)
delivery_timebase = int(time.time())
self.setpersistent(f"telemetry.{RNS.hexrep(message.destination_hash, delimit=False)}.last_request_success_timebase", delivery_timebase)
self.setstate(f"telemetry.{RNS.hexrep(message.destination_hash, delimit=False)}.request_sending", False)
if message.destination_hash == self.config["telemetry_collector"]:
self.pending_telemetry_request = False
Expand Down

0 comments on commit 0902f86

Please sign in to comment.