aboutsummaryrefslogtreecommitdiffstats
path: root/drive/sync_download.go
diff options
context:
space:
mode:
authorPetter Rasmussen2016-04-09 18:04:39 +0200
committerPetter Rasmussen2016-04-09 18:37:33 +0200
commit0e1057e475525536dce2db4754e9d9840ab086f2 (patch)
treee1a1147ba447d8609752594140c82a109772c44c /drive/sync_download.go
parent401e017c5e821ba1dff9bc7e45e809b63c800192 (diff)
downloadgdrive-0e1057e475525536dce2db4754e9d9840ab086f2.tar.bz2
Configurable timeout as argument #127
Diffstat (limited to 'drive/sync_download.go')
-rw-r--r--drive/sync_download.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/drive/sync_download.go b/drive/sync_download.go
index 04b50b9..2494557 100644
--- a/drive/sync_download.go
+++ b/drive/sync_download.go
@@ -19,6 +19,7 @@ type DownloadSyncArgs struct {
Path string
DryRun bool
DeleteExtraneous bool
+ Timeout time.Duration
Resolution ConflictResolution
Comparer FileComparer
}
@@ -188,7 +189,7 @@ func (self *Drive) downloadRemoteFile(id, fpath string, args DownloadSyncArgs, t
}
// Get timeout reader wrapper and context
- timeoutReaderWrapper, ctx := getTimeoutReaderWrapperContext()
+ timeoutReaderWrapper, ctx := getTimeoutReaderWrapperContext(args.Timeout)
res, err := self.service.Files.Get(id).Context(ctx).Download()
if err != nil {