mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-04 23:12:18 +02:00
continue in monitor mode when sync timed out (#265)
* update handling of connection timeouts in monitor mode & allow application continue rather than exit
This commit is contained in:
parent
c24e4b0b1e
commit
9817104ca1
|
@ -382,11 +382,16 @@ int main(string[] args)
|
|||
online = false;
|
||||
}
|
||||
if (online) {
|
||||
try {
|
||||
performSync(sync, singleDirectory, downloadOnly, localFirst, uploadOnly);
|
||||
if (!downloadOnly) {
|
||||
// discard all events that may have been generated by the sync
|
||||
m.update(false);
|
||||
}
|
||||
} catch (CurlException e) {
|
||||
// TODO better check of type of exception from Curl
|
||||
log.log("No network connection to Microsoft OneDrive Service, skipping sync");
|
||||
}
|
||||
}
|
||||
// performSync complete, set lastCheckTime to current time
|
||||
lastCheckTime = MonoTime.currTime();
|
||||
|
|
|
@ -523,7 +523,7 @@ final class OneDriveApi
|
|||
} catch (CurlException e) {
|
||||
// Potentially Timeout was reached on handle error
|
||||
log.error("\nAccess to the Microsoft OneDrive service timed out - Internet connectivity issue?\n");
|
||||
exit(-1);
|
||||
throw e;
|
||||
}
|
||||
|
||||
JSONValue json;
|
||||
|
|
Loading…
Reference in a new issue