exit on timeout error

This commit is contained in:
Colin 2024-04-01 03:49:43 +00:00
parent a413f33126
commit 0890d32e70
1 changed files with 6 additions and 0 deletions

View File

@ -222,6 +222,12 @@ static int op_return(int err, char * operation)
return 0;
}
fprintf(stderr, "ftpfs: operation %s failed because %s\n", operation, strerror(-err));
if (strstr(error_buf, "timed out") != NULL
|| strstr(error_buf, "timeout") != NULL
|| strstr(error_buf, "time-out") != NULL) {
// try to match any curl error which would indiciate that the mount is offline.
fuse_exit(fuse_get_context()->fuse);
}
return err;
}