nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
76 stars 45 forks source link

cf delete file when there is an error during tx #441

Open avan989 opened 2 months ago

avan989 commented 2 months ago

Checklist (Please check before submitting)

Describe the bug CF deletes the file even when there is an error during the TX.

To Reproduce Steps to reproduce the behavior:

  1. Send an tx command/put file in polling directory with small "time-out" in config
  2. Error Message that file.
  3. File gets deleted.

Expected behavior A clear and concise description of what you expected to happen. If there is an error, the file should not be deleted.

Code snips If applicable, add references to the software.

System observed on:

Additional context Add any other context about the problem here.

Reporter Info Full name and company/organization if applicable

Anh Van, GSFC

skliper commented 2 months ago

Might want to handle the case where the file is in the polling directory differently, since if there's an error you could get into an endless loop of attempting to send the file over and over again. Maybe move the file to a "failed" directory?