mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-15 20:26:53 +02:00
gracefully handle connection errors in monitor mode (#253)
* gracefully handle connection errors, resolve issue #234
This commit is contained in:
parent
859b5510a0
commit
11138602ed
|
@ -374,7 +374,13 @@ int main(string[] args)
|
|||
if (!downloadOnly) m.update(online);
|
||||
auto currTime = MonoTime.currTime();
|
||||
if (currTime - lastCheckTime > checkInterval) {
|
||||
online = testNetwork();
|
||||
try {
|
||||
online = testNetwork();
|
||||
} catch (CurlException e) {
|
||||
// No network connection to OneDrive Service
|
||||
log.log("No network connection to Microsoft OneDrive Service, skipping sync");
|
||||
online = false;
|
||||
}
|
||||
if (online) {
|
||||
performSync(sync, singleDirectory, downloadOnly, localFirst, uploadOnly);
|
||||
if (!downloadOnly) {
|
||||
|
|
Loading…
Reference in a new issue