mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Remove usage of go-ieproxy for windows (#10009)
There is a potential for deadlock on Windows 10 refer https://github.com/mattn/go-ieproxy/issues/17 remove this dependency for now.
This commit is contained in:
parent
5c15656c55
commit
968342c732
@ -32,7 +32,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/inconshreveable/go-update"
|
"github.com/inconshreveable/go-update"
|
||||||
"github.com/mattn/go-ieproxy"
|
|
||||||
xhttp "github.com/minio/minio/cmd/http"
|
xhttp "github.com/minio/minio/cmd/http"
|
||||||
"github.com/minio/minio/cmd/logger"
|
"github.com/minio/minio/cmd/logger"
|
||||||
"github.com/minio/minio/pkg/env"
|
"github.com/minio/minio/pkg/env"
|
||||||
@ -409,7 +408,7 @@ const updateTimeout = 10 * time.Second
|
|||||||
|
|
||||||
func getUpdateTransport(timeout time.Duration) http.RoundTripper {
|
func getUpdateTransport(timeout time.Duration) http.RoundTripper {
|
||||||
var updateTransport http.RoundTripper = &http.Transport{
|
var updateTransport http.RoundTripper = &http.Transport{
|
||||||
Proxy: ieproxy.GetProxyFunc(),
|
Proxy: http.ProxyFromEnvironment,
|
||||||
DialContext: xhttp.NewCustomDialContext(timeout),
|
DialContext: xhttp.NewCustomDialContext(timeout),
|
||||||
IdleConnTimeout: timeout,
|
IdleConnTimeout: timeout,
|
||||||
TLSHandshakeTimeout: timeout,
|
TLSHandshakeTimeout: timeout,
|
||||||
|
@ -39,7 +39,6 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mattn/go-ieproxy"
|
|
||||||
xhttp "github.com/minio/minio/cmd/http"
|
xhttp "github.com/minio/minio/cmd/http"
|
||||||
"github.com/minio/minio/cmd/logger"
|
"github.com/minio/minio/cmd/logger"
|
||||||
"github.com/minio/minio/pkg/handlers"
|
"github.com/minio/minio/pkg/handlers"
|
||||||
@ -454,7 +453,7 @@ func newCustomHTTPTransport(tlsConfig *tls.Config, dialTimeout time.Duration) fu
|
|||||||
// For more details about various values used here refer
|
// For more details about various values used here refer
|
||||||
// https://golang.org/pkg/net/http/#Transport documentation
|
// https://golang.org/pkg/net/http/#Transport documentation
|
||||||
tr := &http.Transport{
|
tr := &http.Transport{
|
||||||
Proxy: ieproxy.GetProxyFunc(),
|
Proxy: http.ProxyFromEnvironment,
|
||||||
DialContext: xhttp.NewCustomDialContext(dialTimeout),
|
DialContext: xhttp.NewCustomDialContext(dialTimeout),
|
||||||
MaxIdleConnsPerHost: 16,
|
MaxIdleConnsPerHost: 16,
|
||||||
MaxIdleConns: 16,
|
MaxIdleConns: 16,
|
||||||
|
@ -185,6 +185,7 @@ func lock(ds *Dsync, locks *[]string, id, source string, isReadLock bool, lockNa
|
|||||||
|
|
||||||
g := Granted{index: index}
|
g := Granted{index: index}
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
log("lock: nil locker")
|
||||||
ch <- g
|
ch <- g
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -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
|
// timeout happened, maybe one of the nodes is slow, count
|
||||||
// number of locks to check whether we have quorum or not
|
// number of locks to check whether we have quorum or not
|
||||||
if !quorumMet(locks, isReadLock, dquorum, dquorumReads) {
|
if !quorumMet(locks, isReadLock, dquorum, dquorumReads) {
|
||||||
|
log("Quorum not met after timeout")
|
||||||
releaseAll(ds, locks, isReadLock, restClnts, lockNames...)
|
releaseAll(ds, locks, isReadLock, restClnts, lockNames...)
|
||||||
|
} else {
|
||||||
|
log("Quorum met after timeout")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,8 +21,6 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mattn/go-ieproxy"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultTransport - this default transport is similar to
|
// DefaultTransport - this default transport is similar to
|
||||||
@ -30,7 +28,7 @@ import (
|
|||||||
// is set to true to avoid decompressing content with 'gzip' encoding.
|
// is set to true to avoid decompressing content with 'gzip' encoding.
|
||||||
var DefaultTransport = func(secure bool) http.RoundTripper {
|
var DefaultTransport = func(secure bool) http.RoundTripper {
|
||||||
tr := &http.Transport{
|
tr := &http.Transport{
|
||||||
Proxy: ieproxy.GetProxyFunc(),
|
Proxy: http.ProxyFromEnvironment,
|
||||||
DialContext: (&net.Dialer{
|
DialContext: (&net.Dialer{
|
||||||
Timeout: 5 * time.Second,
|
Timeout: 5 * time.Second,
|
||||||
KeepAlive: 15 * time.Second,
|
KeepAlive: 15 * time.Second,
|
||||||
|
Loading…
Reference in New Issue
Block a user