exit on timeout error
This commit is contained in:
6
ftpfs.c
6
ftpfs.c
@@ -222,6 +222,12 @@ static int op_return(int err, char * operation)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "ftpfs: operation %s failed because %s\n", operation, strerror(-err));
|
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;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user