mirror of
https://github.com/restic/restic.git
synced 2025-03-09 00:00:02 +01:00
s3: Disable keepalive on minio HTTP client
This avoids connections being used for too long and being terminated by the S3 endpoint.
This commit is contained in:
parent
7a8054d678
commit
3b065eeb7d
1 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/minio/minio-go"
|
||||
|
@ -39,6 +40,11 @@ func Open(cfg Config) (backend.Backend, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
tr := &http.Transport{
|
||||
DisableKeepAlives: true,
|
||||
}
|
||||
client.SetCustomTransport(tr)
|
||||
|
||||
be := &s3{client: client, bucketname: cfg.Bucket}
|
||||
be.createConnections()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue