diff --git a/src/duplicacy_swiftstorage.go b/src/duplicacy_swiftstorage.go index 0a92267..d82aa1d 100644 --- a/src/duplicacy_swiftstorage.go +++ b/src/duplicacy_swiftstorage.go @@ -108,7 +108,8 @@ func CreateSwiftStorage(storageURL string, key string, threads int) (storage *Sw arguments["protocol"] = "https" } - ctx := context.TODO + ctx, cancel := context.WithDeadline(context.Background(), time.Millisecond) + defer cancel() // Please refer to https://godoc.org/github.com/ncw/swift#Connection connection := swift.Connection{