op_return: also log the inner error, since we use that for matching against timeouts
This commit is contained in:
3
ftpfs.c
3
ftpfs.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user