Skip to content

Commit

Permalink
Merge pull request #32 from oresat/cfdp-py
Browse files Browse the repository at this point in the history
Reset on all exceptions from cfdp insert_packet()/state_machine()
  • Loading branch information
ryanpdx authored May 27, 2024
2 parents 5c298ac + 9ea92f3 commit 02a56ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oresat_c3/services/edl.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def loop(self, pdu: AbstractFileDirectiveBase):
if get_packet_destination(pdu) == PacketDestination.DEST_HANDLER:
try:
self.dest.insert_packet(pdu)
except FsmNotCalledAfterPacketInsertion:
except Exception:
# Usually this exception means the library is being used wrong, so we have
# to be careful here. However there is a bug in the presence of dropped packets
# where dest._params.last_inserted_packet does not get cleared.
Expand All @@ -490,7 +490,7 @@ def loop(self, pdu: AbstractFileDirectiveBase):
else:
try:
self.source.insert_packet(pdu)
except FsmNotCalledAfterPacketInsertion:
except Exception:
logger.exception("source.state_machine() didn't properly clear inserted packet")
self.source.reset()

Expand All @@ -513,7 +513,7 @@ def loop(self, pdu: AbstractFileDirectiveBase):
try:
self.dest.state_machine()
self.source.state_machine()
except (UnretrievedPdusToBeSent, SourceFileDoesNotExist):
except Exception:
logger.exception("state_machine failed to update")
self.dest.reset()
self.source.reset()
Expand Down

0 comments on commit 02a56ab

Please sign in to comment.