Skip to content

Commit

Permalink
Remove go-ieproxy
Browse files Browse the repository at this point in the history
Remove windows specific proxy since it causes lockups as per mattn/go-ieproxy#17

Instead use standard Go HTTP proxy.
  • Loading branch information
klauspost committed Jul 10, 2020
1 parent efe9fe6 commit 1fea692
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"time"

"github.com/inconshreveable/go-update"
"github.com/mattn/go-ieproxy"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/env"
Expand Down Expand Up @@ -409,7 +408,7 @@ const updateTimeout = 10 * time.Second

func getUpdateTransport(timeout time.Duration) http.RoundTripper {
var updateTransport http.RoundTripper = &http.Transport{
Proxy: ieproxy.GetProxyFunc(),
Proxy: http.ProxyFromEnvironment,
DialContext: xhttp.NewCustomDialContext(timeout),
IdleConnTimeout: timeout,
TLSHandshakeTimeout: timeout,
Expand Down
3 changes: 1 addition & 2 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"sync"
"time"

"github.com/mattn/go-ieproxy"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/handlers"
Expand Down Expand Up @@ -454,7 +453,7 @@ func newCustomHTTPTransport(tlsConfig *tls.Config, dialTimeout time.Duration) fu
// For more details about various values used here refer
// https://golang.org/pkg/net/http/#Transport documentation
tr := &http.Transport{
Proxy: ieproxy.GetProxyFunc(),
Proxy: http.ProxyFromEnvironment,
DialContext: xhttp.NewCustomDialContext(dialTimeout),
MaxIdleConnsPerHost: 16,
MaxIdleConns: 16,
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ require (
github.com/klauspost/reedsolomon v1.9.9
github.com/lib/pq v1.7.0
github.com/mattn/go-colorable v0.1.4
github.com/mattn/go-ieproxy v0.0.1
github.com/mattn/go-isatty v0.0.8
github.com/miekg/dns v1.1.8
github.com/minio/cli v1.22.0
Expand Down
4 changes: 4 additions & 0 deletions pkg/dsync/drwmutex.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func lock(ds *Dsync, locks *[]string, id, source string, isReadLock bool, lockNa

g := Granted{index: index}
if c == nil {
log("lock: nil locker")
ch <- g
return
}
Expand Down Expand Up @@ -258,7 +259,10 @@ func lock(ds *Dsync, locks *[]string, id, source string, isReadLock bool, lockNa
// timeout happened, maybe one of the nodes is slow, count
// number of locks to check whether we have quorum or not
if !quorumMet(locks, isReadLock, dquorum, dquorumReads) {
log("Quorum not met after timeout")
releaseAll(ds, locks, isReadLock, restClnts, lockNames...)
} else {
log("Quorum met after timeout")
}
}

Expand Down
4 changes: 1 addition & 3 deletions pkg/madmin/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ import (
"net"
"net/http"
"time"

"github.com/mattn/go-ieproxy"
)

// DefaultTransport - this default transport is similar to
// http.DefaultTransport but with additional param DisableCompression
// is set to true to avoid decompressing content with 'gzip' encoding.
var DefaultTransport = func(secure bool) http.RoundTripper {
tr := &http.Transport{
Proxy: ieproxy.GetProxyFunc(),
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 5 * time.Second,
KeepAlive: 15 * time.Second,
Expand Down

0 comments on commit 1fea692

Please sign in to comment.