Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

fs/fshttp: fix --contimeout being ignored

你知道未来吗fd2322cb41d6
diff --git a/fs/fshttp/dialer.go b/fs/fshttp/dialer.go
index a41b478b8..a8ff67bc6 100644
--- a/fs/fshttp/dialer.go
+++ b/fs/fshttp/dialer.go
@@ -14,10 +14,6 @@ import (
"golang.org/x/net/ipv6"
)
-func dialContext(ctx context.Context, network, address string, ci *fs.ConfigInfo) (net.Conn, error) {
- return NewDialer(ctx).DialContext(ctx, network, address)
-}
-
// Dialer structure contains default dialer and timeout, tclass support
type Dialer struct {
net.Dialer
diff --git a/fs/fshttp/http.go b/fs/fshttp/http.go
index f17c8298e..498714dfd 100644
--- a/fs/fshttp/http.go
+++ b/fs/fshttp/http.go
@@ -91,8 +91,8 @@ func NewTransportCustom(ctx context.Context, customize func(*http.Transport)) ht
}
t.DisableCompression = ci.NoGzip
- t.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
- return dialContext(ctx, network, addr, ci)
+ t.DialContext = func(reqCtx context.Context, network, addr string) (net.Conn, error) {
+ return NewDialer(ctx).DialContext(reqCtx, network, addr)
}
t.IdleConnTimeout = 60 * time.Second
t.ExpectContinueTimeout = ci.ExpectContinueTimeout