Closed peterstory closed 3 weeks ago
Here is an approach which works well:
I repeatedly sent files for 15 minutes, and despite many cases where tar exited prematurely, the GUI behaved as expected (it kept receiving files, and no errors were displayed).
Also, an error message is displayed when an actual transfer error occurs (i.e., send a large transfer, cancel it midway, then send it again).
On the receiver, I occasionally get the error:
Error: "tar" exited prematurely.
Which is issued by this line of code: https://github.com/ClarkuCSCI/pydiode/blob/main/src/pydiode/gui/common.py#L47
My reasoning for these errors: if the tar process exits before pydiode, then pydiode can get stuck waiting for a process to read its STDOUT. In this case, we terminate pydiode. However, process exit order is nondeterministic, so sometimes tar appears to exit before pydiode, even when both processes complete normally.
I will check whether simply omitting these errors resolves things.
To trigger the issue with benign behavior, I send files repeatedly:
To trigger a premature exit with an actual error, follow the procedure described in #5. That is, send a large transfer, cancel it midway, then send it again.