mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-06 00:03:38 +00:00
DOn't cancel the context and use a sane deadline.
This commit is contained in:
@@ -108,9 +108,7 @@ func CreateSwiftStorage(storageURL string, key string, threads int) (storage *Sw
|
||||
arguments["protocol"] = "https"
|
||||
}
|
||||
|
||||
// This context ends up expired, which is fine.
|
||||
ctx, cancel := context.WithDeadline(context.Background(), time.Now())
|
||||
defer cancel()
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second)
|
||||
|
||||
// Please refer to https://godoc.org/github.com/ncw/swift#Connection
|
||||
connection := swift.Connection{
|
||||
|
||||
Reference in New Issue
Block a user