diff --git a/proxy/hybrid-transport.go b/proxy/hybrid-transport.go index 5350b06..e2f1615 100644 --- a/proxy/hybrid-transport.go +++ b/proxy/hybrid-transport.go @@ -49,6 +49,7 @@ func NewHybridTransportWithCalls(normal, insecure http.RoundTripper, ws *websock IdleConnTimeout: 30 * time.Second, ExpectContinueTimeout: 1 * time.Second, ResponseHeaderTimeout: 10 * time.Second, + DisableKeepAlives: true, } } if h.insecureTransport == nil { @@ -62,6 +63,7 @@ func NewHybridTransportWithCalls(normal, insecure http.RoundTripper, ws *websock ExpectContinueTimeout: 1 * time.Second, ResponseHeaderTimeout: 10 * time.Second, TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + DisableKeepAlives: true, } } return h diff --git a/utils/server-utils.go b/utils/server-utils.go index 41eac5a..bc8d8f4 100644 --- a/utils/server-utils.go +++ b/utils/server-utils.go @@ -1,6 +1,7 @@ package utils import ( + "errors" "log" "net/http" "strings" @@ -10,7 +11,7 @@ import ( // RunBackgroundHttp and RunBackgroundHttps. func logHttpServerError(prefix string, err error) { if err != nil { - if err == http.ErrServerClosed { + if errors.Is(err, http.ErrServerClosed) { log.Printf("[%s] The http server shutdown successfully\n", prefix) } else { log.Printf("[%s] Error trying to host the http server: %s\n", prefix, err.Error())