mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-21 15:16:36 +02:00
* By moving the UploadSession creation from the constructor to the init function we guarantee that a re-initialization also starts a new UploadSession.
This commit is contained in:
parent
97193107ee
commit
b668ecef71
|
@ -577,7 +577,7 @@ int main(string[] args)
|
|||
// we already tried three times in the performSync routine
|
||||
// if we still have problems, then the sync handle might have
|
||||
// gone stale and we need to re-initialize the sync engine
|
||||
log.log("Pesistent connection errors, reinitializing connection");
|
||||
log.log("Persistent connection errors, reinitializing connection");
|
||||
sync.reset();
|
||||
}
|
||||
} catch (CurlException e) {
|
||||
|
|
|
@ -208,7 +208,7 @@ final class SyncEngine
|
|||
this.onedrive = onedrive;
|
||||
this.itemdb = itemdb;
|
||||
this.selectiveSync = selectiveSync;
|
||||
session = UploadSession(onedrive, cfg.uploadStateFilePath);
|
||||
// session = UploadSession(onedrive, cfg.uploadStateFilePath);
|
||||
}
|
||||
|
||||
void reset()
|
||||
|
@ -226,6 +226,8 @@ final class SyncEngine
|
|||
return;
|
||||
}
|
||||
|
||||
session = UploadSession(onedrive, cfg.uploadStateFilePath);
|
||||
|
||||
// Need to catch 400 or 5xx server side errors at initialization
|
||||
try {
|
||||
oneDriveDetails = onedrive.getDefaultDrive();
|
||||
|
|
Loading…
Reference in a new issue