Make handshake timeout consistent with rancher agent

This commit is contained in:
Darren Shepherd 2021-05-10 15:06:46 -07:00
parent c6547ae887
commit 43139e348a

View File

@ -15,10 +15,14 @@ import (
"github.com/sirupsen/logrus"
)
const (
HandshakeTimeOut = 10 * time.Second
)
func ListenAndServe(ctx context.Context, url string, caCert []byte, token string, handler http.Handler) {
dialer := websocket.Dialer{
Proxy: http.ProxyFromEnvironment,
HandshakeTimeout: 45 * time.Second,
HandshakeTimeout: HandshakeTimeOut,
}
if caCert != nil && len(caCert) == 0 {