Skip to content

Commit

Permalink
GCS: allow a 10 seconds timeout for client creation
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Jan 11, 2025
1 parent 11055d4 commit d18e1ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/vfs/gcsfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,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)
} else {
Expand Down

0 comments on commit d18e1ba

Please sign in to comment.