jcs
/subtext
/amendments
/271
folder: Check for session->ending during ZModem transfer
jcs made amendment 271 over 2 years ago
--- folder.c Sun Nov 6 21:13:05 2022
+++ folder.c Mon Nov 7 11:54:18 2022
@@ -390,8 +390,10 @@ folder_upload(struct session *s, struct folder *folder
ZInit(zs);
s->transferring_file = true;
- session_logf(s, "[%s] Uploading file to %s", folder->name, upload_path);
- for (;;) {
+ session_flush(s);
+ session_logf(s, "[%s] Receiving uploaded file to %s", folder->name,
+ upload_path);
+ while (!session->ending) {
if (ZHaveTimedOut(zs)) {
ZTimeOutProc(zs);
session_logf(s, "[%s] Transfer timed out, canceling",