Skip to content

Commit

Permalink
Merge pull request #97083 from knight42/feat/enable-spdy-ping
Browse files Browse the repository at this point in the history
feat: enable SPDY pings on connections
  • Loading branch information
k8s-ci-robot committed Jan 13, 2021
2 parents e059af6 + d0dce70 commit a3bf53a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion staging/src/k8s.io/client-go/transport/spdy/spdy.go
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"net/http"
"net/url"
"time"

"k8s.io/apimachinery/pkg/util/httpstream"
"k8s.io/apimachinery/pkg/util/httpstream/spdy"
Expand All @@ -42,7 +43,13 @@ func RoundTripperFor(config *restclient.Config) (http.RoundTripper, Upgrader, er
if config.Proxy != nil {
proxy = config.Proxy
}
upgradeRoundTripper := spdy.NewRoundTripperWithProxy(tlsConfig, true, false, proxy)
upgradeRoundTripper := spdy.NewRoundTripperWithConfig(spdy.RoundTripperConfig{
TLS: tlsConfig,
FollowRedirects: true,
RequireSameHostRedirects: false,
Proxier: proxy,
PingPeriod: time.Second * 5,
})
wrapper, err := restclient.HTTPWrappersForConfig(config, upgradeRoundTripper)
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit a3bf53a

Please sign in to comment.