[ARVADOS] created: 1.3.0-2542-gadd741b14

Git user git at public.arvados.org
Tue May 5 17:11:53 UTC 2020


        at  add741b14a5e6e865daaa3da04250b469f15c62e (commit)


commit add741b14a5e6e865daaa3da04250b469f15c62e
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Tue May 5 13:11:23 2020 -0400

    Enable http2 for arvadosclient.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/sdk/go/arvadosclient/arvadosclient.go b/sdk/go/arvadosclient/arvadosclient.go
index e2c046662..7b2209229 100644
--- a/sdk/go/arvadosclient/arvadosclient.go
+++ b/sdk/go/arvadosclient/arvadosclient.go
@@ -25,6 +25,7 @@ import (
 	"time"
 
 	"git.arvados.org/arvados.git/sdk/go/arvados"
+	"golang.org/x/net/http2"
 )
 
 type StringMatcher func(string) bool
@@ -436,8 +437,15 @@ func (ac *ArvadosClient) httpClient() *http.Client {
 	if *c == nil {
 		defaultHTTPClientMtx.Lock()
 		defer defaultHTTPClientMtx.Unlock()
-		*c = &http.Client{Transport: &http.Transport{
-			TLSClientConfig: MakeTLSConfig(ac.ApiInsecure)}}
+		transport := &http.Transport{
+			TLSClientConfig:   MakeTLSConfig(ac.ApiInsecure),
+			ForceAttemptHTTP2: true,
+		}
+		err := http2.ConfigureTransport(transport)
+		if err != nil {
+			panic(err)
+		}
+		*c = &http.Client{Transport: transport}
 	}
 	return *c
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list