mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-14 14:25:52 +01:00
GCS: allow a 10 seconds timeout for client creation
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
1f4cb7077a
commit
b2e9935049
1 changed files with 3 additions and 1 deletions
|
|
@ -86,7 +86,9 @@ func NewGCSFs(connectionID, localTempDir, mountPath string, config GCSFsConfig)
|
|||
if err = fs.config.validate(); err != nil {
|
||||
return fs, err
|
||||
}
|
||||
ctx := context.Background()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
if fs.config.AutomaticCredentials > 0 {
|
||||
fs.svc, err = storage.NewClient(ctx,
|
||||
storage.WithJSONReads(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue