aboutsummaryrefslogtreecommitdiffstats
path: root/drive/sync_download.go
diff options
context:
space:
mode:
authorPetter Rasmussen2016-04-09 18:28:04 +0200
committerPetter Rasmussen2016-04-09 18:37:38 +0200
commit28c5b9beb7b16dc0e1a39fc61163868dcbc02d19 (patch)
tree79dcc943d8d1dedab6f5fed180f42dadca23020f /drive/sync_download.go
parent0e1057e475525536dce2db4754e9d9840ab086f2 (diff)
downloadgdrive-28c5b9beb7b16dc0e1a39fc61163868dcbc02d19.tar.bz2
Give proper timeout error message
Diffstat (limited to 'drive/sync_download.go')
-rw-r--r--drive/sync_download.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/drive/sync_download.go b/drive/sync_download.go
index 2494557..10dfd16 100644
--- a/drive/sync_download.go
+++ b/drive/sync_download.go
@@ -197,6 +197,8 @@ func (self *Drive) downloadRemoteFile(id, fpath string, args DownloadSyncArgs, t
exponentialBackoffSleep(try)
try++
return self.downloadRemoteFile(id, fpath, args, try)
+ } else if isTimeoutError(err) {
+ return fmt.Errorf("Failed to download file: timeout, no data was transferred for %v", args.Timeout)
} else {
return fmt.Errorf("Failed to download file: %s", err)
}