op_return: also log the inner error, since we use that for matching against timeouts

This commit is contained in:
2024-10-12 01:06:03 +00:00
parent ee70864395
commit 8f2d6449f7

View File

@@ -224,11 +224,12 @@ static int op_return(int err, char * operation)
DEBUG(2, "%s successful\n", operation);
return 0;
}
dprintf(ftpfs.stderr_fd, "ftpfs: operation %s failed because %s\n", operation, strerror(-err));
dprintf(ftpfs.stderr_fd, "ftpfs: operation %s failed because %s. inner: %s\n", operation, strerror(-err), error_buf);
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.
dprintf(ftpfs.stderr_fd, "exiting due to timeout\n");
fuse_exit(fuse_get_context()->fuse);
}
return err;